Minor fixes

This commit is contained in:
João Brázio 2025-09-24 16:46:03 +01:00
parent 1d45c7ec66
commit 2297d24013
No known key found for this signature in database
GPG key ID: 56A1490716A324DD
2 changed files with 5 additions and 3 deletions

View file

@ -165,12 +165,13 @@ public:
void updateAdvertTimer() override;
void updateFloodAdvertTimer() override;
#if defined(WITH_ESPNOW_BRIDGE)
#if defined(WITH_BRIDGE)
void setBridgeState(bool enable) {
if (enable == bridge.getState()) return;
enable ? bridge.begin() : bridge.end();
}
#if defined(WITH_ESPNOW_BRIDGE)
void updateBridgeChannel(int ch) override {
bridge.setChannel(ch);
if (bridge.getState()) {
@ -178,6 +179,7 @@ public:
bridge.begin();
}
}
#endif
#endif
void setLoggingOn(bool enable) override { _logging = enable; }

View file

@ -31,7 +31,7 @@ struct NodePrefs { // persisted to file
uint8_t interference_threshold;
uint8_t agc_reset_interval; // secs / 4
uint8_t bridge_enabled; // boolean
uint8_t bridge_channel; // 0 = AUTO, 1-14 valid
uint8_t bridge_channel; // 1-14
};
class CommonCLICallbacks {
@ -56,7 +56,7 @@ public:
virtual void saveIdentity(const mesh::LocalIdentity& new_id) = 0;
virtual void clearStats() = 0;
virtual void applyTempRadioParams(float freq, float bw, uint8_t sf, uint8_t cr, int timeout_mins) = 0;
#ifdef WITH_ESPNOW_BRIDGE
virtual void setBridgeState(bool enable) = 0;
virtual void updateBridgeChannel(int ch) = 0;