|
|
|
@ -658,6 +658,14 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc |
|
|
|
_prefs.gps_enabled = 0; |
|
|
|
_prefs.gps_interval = 0; |
|
|
|
_prefs.advert_loc_policy = ADVERT_LOC_PREFS; |
|
|
|
|
|
|
|
#if defined(USE_SX1262) || defined(USE_SX1268) |
|
|
|
#ifdef SX126X_RX_BOOSTED_GAIN |
|
|
|
_prefs.rx_boosted_gain = SX126X_RX_BOOSTED_GAIN; |
|
|
|
#else |
|
|
|
_prefs.rx_boosted_gain = 1; // enabled by default;
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
_prefs.radio_fem_rxgain = 1; |
|
|
|
|
|
|
|
next_post_idx = 0; |
|
|
|
@ -700,6 +708,7 @@ void MyMesh::begin(FILESYSTEM *fs) { |
|
|
|
|
|
|
|
radio_driver.setParams(_prefs.freq, _prefs.bw, _prefs.sf, _prefs.cr); |
|
|
|
radio_driver.setTxPower(_prefs.tx_power_dbm); |
|
|
|
radio_driver.setRxBoostedGainMode(_prefs.rx_boosted_gain); |
|
|
|
board.setLoRaFemLnaEnabled(_prefs.radio_fem_rxgain); |
|
|
|
|
|
|
|
updateAdvertTimer(); |
|
|
|
@ -807,6 +816,10 @@ void MyMesh::setTxPower(int8_t power_dbm) { |
|
|
|
radio_driver.setTxPower(power_dbm); |
|
|
|
} |
|
|
|
|
|
|
|
bool MyMesh::setRxBoostedGain(bool enable) { |
|
|
|
return radio_driver.setRxBoostedGainMode(enable); |
|
|
|
} |
|
|
|
|
|
|
|
void MyMesh::saveIdentity(const mesh::LocalIdentity &new_id) { |
|
|
|
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM) |
|
|
|
IdentityStore store(*_fs, ""); |
|
|
|
|