Set defaults to powersaving_enabled=1 and radio_fem_rxgain=0 for fresh installs

This commit is contained in:
Kevin Le committed 2026-10-04 18:29:05 +07:00
1 parent fc182b7769
commit 9414de8593
4 files changed
+17 -5

No files matched your search

+4 -2
View File
@@ -915,7 +915,7 @@ MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMe
_prefs.tx_power_dbm = LORA_TX_POWER;
_prefs.gps_enabled = 0; // GPS disabled by default
_prefs.gps_interval = 0; // No automatic GPS updates by default
_prefs.radio_fem_rxgain = 1;
_prefs.radio_fem_rxgain = 0; // PowerSaving and better signal
_prefs.radio_fem_txgain = 0;
//_prefs.rx_delay_base = 10.0f; enable once new algo fixed
_prefs.setRepeatEn(false);
@@ -926,7 +926,9 @@ MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMe
_prefs.rx_boosted_gain = 1; // enabled by default
#endif
#endif
_prefs.powersaving_enabled = 1; // Power Saving enabled by default
// PowerSaving defaults
_prefs.powersaving_enabled = 1;
}
void MyMesh::begin(bool has_display) {
+5 -1
View File
@@ -964,13 +964,17 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
_prefs.rx_boosted_gain = 1; // enabled by default;
#endif
#endif
_prefs.radio_fem_rxgain = 1;
_prefs.radio_fem_rxgain = 0; // PowerSaving and better signal
_prefs.radio_fem_txgain = 0;
pending_discover_tag = 0;
pending_discover_until = 0;
memset(default_scope.key, 0, sizeof(default_scope.key));
// PowerSaving defaults
_prefs.powersaving_enabled = 1;
}
void MyMesh::begin(FILESYSTEM *fs) {
+4 -1
View File
@@ -681,7 +681,7 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
_prefs.rx_boosted_gain = 1; // enabled by default;
#endif
#endif
_prefs.radio_fem_rxgain = 1;
_prefs.radio_fem_rxgain = 0; // PowerSaving and better signal
_prefs.radio_fem_txgain = 0;
next_post_idx = 0;
@@ -691,6 +691,9 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
_num_posted = _num_post_pushes = 0;
memset(default_scope.key, 0, sizeof(default_scope.key));
// PowerSaving defaults
_prefs.powersaving_enabled = 1;
}
void MyMesh::begin(FILESYSTEM *fs) {
+4 -1
View File
@@ -773,10 +773,13 @@ SensorMesh::SensorMesh(mesh::MainBoard& board, mesh::Radio& radio, mesh::Millise
_prefs.gps_enabled = 0;
_prefs.gps_interval = 0;
_prefs.advert_loc_policy = ADVERT_LOC_PREFS;
_prefs.radio_fem_rxgain = 1;
_prefs.radio_fem_rxgain = 0; // PowerSaving and better signal
_prefs.radio_fem_txgain = 0;
memset(default_scope.key, 0, sizeof(default_scope.key));
// PowerSaving defaults
_prefs.powersaving_enabled = 1;
}
void SensorMesh::begin(FILESYSTEM* fs) {