display/input rotate

This commit is contained in:
liquidraver
2026-08-25 15:19:11 +02:00
parent 4632797e3e
commit 2e3f5f3f59
20 changed files with 544 additions and 19 deletions
+8
View File
@@ -240,6 +240,11 @@ bool RepeaterDataStore::loadPrefs(NodePrefs& prefs) {
* EOF read keeps the initNodePrefs() default fem_rxgain=1, which is what
* every already-deployed node has been running. */
fs_read(&file, &prefs.fem_rxgain, sizeof(prefs.fem_rxgain));
/* Mounting orientation, offsets 305-306. Absent in <307-byte files; the
* no-op EOF reads keep the initNodePrefs() defaults of 0/0, which is the
* stock orientation every already-deployed node runs. */
fs_read(&file, &prefs.display_rotate, sizeof(prefs.display_rotate));
fs_read(&file, &prefs.input_rotate, sizeof(prefs.input_rotate));
fs_close(&file);
@@ -385,6 +390,9 @@ bool RepeaterDataStore::savePrefs(const NodePrefs& prefs) {
fs_write(&file, prefs.extra_sf, sizeof(prefs.extra_sf));
/* External FEM RX gain (offset 304) */
fs_write(&file, &prefs.fem_rxgain, sizeof(prefs.fem_rxgain));
/* Mounting orientation (offsets 305-306) */
fs_write(&file, &prefs.display_rotate, sizeof(prefs.display_rotate));
fs_write(&file, &prefs.input_rotate, sizeof(prefs.input_rotate));
ret = fs_sync(&file);
fs_close(&file);