feat(docs): add local testing instructions for MQTT functionality
Include detailed instructions for local testing of observer and WiFi functionality without hardware. Document the use of a mock backend and Wokwi ESP32-S3 simulation for easier development and testing. Enhance the MQTT implementation documentation to improve developer experience and facilitate testing workflows.
This commit is contained in:
1 parent
b7795720b2
commit
cbbd01b620
23 files changed
+1403
-131
No files matched your search
@@ -3,6 +3,9 @@
|
||||
|
||||
HeltecV3Board board;
|
||||
|
||||
#ifdef SIM_BUILD
|
||||
SimRadio radio_driver(board); // no-op radio for emulator builds
|
||||
#else
|
||||
#if defined(P_LORA_SCLK)
|
||||
static SPIClass spi;
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
|
||||
@@ -11,6 +14,7 @@ HeltecV3Board board;
|
||||
#endif
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
#endif
|
||||
|
||||
ESP32RTCClock fallback_clock;
|
||||
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
||||
@@ -31,8 +35,10 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
||||
bool radio_init() {
|
||||
fallback_clock.begin();
|
||||
rtc_clock.begin(Wire);
|
||||
|
||||
#if defined(P_LORA_SCLK)
|
||||
|
||||
#ifdef SIM_BUILD
|
||||
return true; // no SPI radio to bring up
|
||||
#elif defined(P_LORA_SCLK)
|
||||
return radio.std_init(&spi);
|
||||
#else
|
||||
return radio.std_init();
|
||||
@@ -40,7 +46,12 @@ bool radio_init() {
|
||||
}
|
||||
|
||||
mesh::LocalIdentity radio_new_identity() {
|
||||
#ifdef SIM_BUILD
|
||||
SimRNG rng;
|
||||
return mesh::LocalIdentity(&rng);
|
||||
#else
|
||||
RadioNoiseListener rng(radio);
|
||||
return mesh::LocalIdentity(&rng); // create new random identity
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user