Update capability fixtures and cover primary preamble settings

This commit is contained in:
mikecarper committed 2026-10-28 19:53:50 -07:00
1 parent 0ba56acead
commit 5e117cb89f
6 files changed
+94 -1

No files matched your search

+20
View File
@@ -15,6 +15,7 @@ HardwareSerial Serial;
#include <helpers/UsbMode.h>
#include <helpers/esp32/ManagementPassword.h>
#include <helpers/CLICommandUtils.h>
#include <helpers/ConfigCapabilities.h>
#include <helpers/WebConfigBatch.h>
#include <helpers/WebConfigKeys.h>
namespace password = mesh::esp32::managementPassword;
@@ -35,6 +36,23 @@ Debug& usbDebugPort() { static Debug value; return value; }
struct StrHelper { static void strncpy(char* out, const char* in, size_t size) {
::strncpy(out, in, size); out[size - 1] = 0;
}};
// Preserve the full Companion command prefix without allowing password
// handling to consult unrelated hardware capability or profile providers.
struct Board {
bool getSystemWatchdogRunning(bool&) { assert(false); return false; }
bool canControlLoRaFemLna() { assert(false); return false; }
bool canControlLoRaFemPaGain() { assert(false); return false; }
bool isLoRaFemPaGainEnabled() { assert(false); return false; }
} board;
struct Radio {
bool supportsRxPowerSavingRfRxDisable() const { assert(false); return false; }
} radio_driver;
struct UI {
bool supportsDisplayRotation() { assert(false); return false; }
};
struct Profiles {
uint16_t primaryPreamble() const { assert(false); return 0; }
};
struct CommonCLI {
struct Prefs { char password[16] = "original"; } prefs;
Prefs* _prefs = &prefs;
@@ -44,6 +62,8 @@ struct CommonCLI {
}
};
struct MyMesh {
Profiles _radio_profiles;
UI* _ui = nullptr;
char _management_password[16] = "original";
bool _management_password_ready = true;
bool handleLocalControlCommand(const char*, char*, size_t);