Skip to content

Commit 4fef3c3

Browse files
committed
ESP-NOW: Replace espnowStop with ESPNOW_STOP macro
1 parent 6b2e0d8 commit 4fef3c3

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Firmware/RTK_Everywhere/Developer.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ void webServerUpdate() {}
177177

178178
#ifndef COMPILE_ESPNOW
179179

180-
bool espNowStop() {return false;}
181-
182180
bool espnowGetState() {return ESPNOW_OFF;}
183181
bool espnowIsPaired() {return false;}
184182
void espnowProcessRTCM(byte incoming) {}
@@ -189,6 +187,7 @@ void espnowStart() {}
189187
#define ESPNOW_START() false
190188
void espnowStaticPairing() {}
191189
void espnowStop() {}
190+
#define ESPNOW_STOP() true
192191
void updateEspnow() {}
193192

194193
#endif // COMPILE_ESPNOW

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ uint8_t receivedMAC[6]; // Holds the broadcast MAC during pairing
615615
unsigned long lastEspnowRssiUpdate;
616616

617617
#define ESPNOW_START() espnowStart()
618+
#define ESPNOW_STOP() espnowStop()
618619
#endif // COMPILE_ESPNOW
619620

620621
int espnowRSSI;

Firmware/RTK_Everywhere/States.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ void stateUpdate()
442442
displayWebConfigNotStarted(); // Display immediately while we wait for server to start
443443

444444
bluetoothStop(); // Bluetooth must be stopped to allow enough RAM for AP+STA (firmware check)
445-
espnowStop(); // We don't need ESP-NOW during web config
445+
ESPNOW_STOP(); // We don't need ESP-NOW during web config
446446

447447
// The GNSS UART task is left running to allow GNSS receivers to obtain LLh data for 1Hz page updates
448448

Firmware/RTK_Everywhere/menuFirmware.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void updateFromSD(const char *firmwareFileName)
261261
}
262262

263263
// Turn off any tasks so that we are not disrupted
264-
espnowStop();
264+
ESPNOW_STOP();
265265
WIFI_STOP();
266266
bluetoothStop();
267267

Firmware/RTK_Everywhere/menuMain.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ void menuRadio()
607607
if (settings.enableEspNow == true)
608608
ESPNOW_START();
609609
else
610-
espnowStop();
610+
ESPNOW_STOP();
611611
}
612612
else if (settings.enableEspNow == true && incoming == 2)
613613
{

0 commit comments

Comments
 (0)