mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-02 06:33:42 +00:00
implement radio.fem.rxgain
This commit is contained in:
@@ -236,6 +236,10 @@ bool RepeaterDataStore::loadPrefs(NodePrefs& prefs) {
|
||||
/* LR2021 side-detector SFs, offsets 301-303. Absent in <304-byte files;
|
||||
* the no-op EOF read leaves the zeroed default = feature off. */
|
||||
fs_read(&file, prefs.extra_sf, sizeof(prefs.extra_sf));
|
||||
/* External FEM RX gain, offset 304. Absent in <305-byte files; the no-op
|
||||
* 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));
|
||||
|
||||
fs_close(&file);
|
||||
|
||||
@@ -379,6 +383,8 @@ bool RepeaterDataStore::savePrefs(const NodePrefs& prefs) {
|
||||
fs_write(&file, &prefs.cad_busycap, sizeof(prefs.cad_busycap));
|
||||
/* LR2021 side-detector SFs (offsets 301-303) */
|
||||
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));
|
||||
|
||||
ret = fs_sync(&file);
|
||||
fs_close(&file);
|
||||
|
||||
Reference in New Issue
Block a user