mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Implement remote lna toggle cli cmd
This commit is contained in:
parent
3f33455b4d
commit
71136671bd
171 changed files with 925 additions and 27 deletions
|
|
@ -801,6 +801,14 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
|
|||
_prefs.advert_loc_policy = ADVERT_LOC_PREFS;
|
||||
|
||||
_prefs.adc_multiplier = 0.0f; // 0.0f means use default board multiplier
|
||||
|
||||
#if defined(USE_SX1262) || defined(USE_SX1268)
|
||||
#ifdef SX126X_RX_BOOSTED_GAIN
|
||||
_prefs.sx126x_rx_boosted_gain = SX126X_RX_BOOSTED_GAIN;
|
||||
#else
|
||||
_prefs.sx126x_rx_boosted_gain = 1; // enabled by default;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyMesh::begin(FILESYSTEM *fs) {
|
||||
|
|
@ -821,6 +829,12 @@ void MyMesh::begin(FILESYSTEM *fs) {
|
|||
radio_set_params(_prefs.freq, _prefs.bw, _prefs.sf, _prefs.cr);
|
||||
radio_set_tx_power(_prefs.tx_power_dbm);
|
||||
|
||||
#if defined(USE_SX1262) || defined(USE_SX1268)
|
||||
radio_set_rx_boosted_gain_mode(_prefs.sx126x_rx_boosted_gain);
|
||||
MESH_DEBUG_PRINTLN("SX126x RX Boosted Gain Mode: %s",
|
||||
radio_get_rx_boosted_gain_mode() ? "Enabled" : "Disabled");
|
||||
#endif
|
||||
|
||||
updateAdvertTimer();
|
||||
updateFloodAdvertTimer();
|
||||
|
||||
|
|
|
|||
|
|
@ -234,4 +234,10 @@ public:
|
|||
|
||||
// To check if there is pending work
|
||||
bool hasPendingWork() const;
|
||||
|
||||
#if defined(USE_SX1262) || defined(USE_SX1268)
|
||||
void setRxBoostedGain(bool enable) override {
|
||||
radio_set_rx_boosted_gain_mode(enable);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue