@@ -26,11 +26,10 @@ void menuMain()
2626 while (1 )
2727 {
2828 systemPrintln ();
29- #ifdef ENABLE_DEVELOPER
30- systemPrintf (" SparkFun RTK %s v%d.%d-RC-%s\r\n " , platformPrefix, FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR, __DATE__);
31- #else
32- systemPrintf (" SparkFun RTK %s v%d.%d-%s\r\n " , platformPrefix, FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR, __DATE__);
33- #endif
29+ if (ENABLE_DEVELOPER)
30+ systemPrintf (" SparkFun RTK %s v%d.%d-RC-%s\r\n " , platformPrefix, FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR, __DATE__);
31+ else
32+ systemPrintf (" SparkFun RTK %s v%d.%d-%s\r\n " , platformPrefix, FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR, __DATE__);
3433
3534#ifdef COMPILE_BT
3635 systemPrint (" ** Bluetooth broadcasting as: " );
@@ -242,7 +241,7 @@ void menuUserProfiles()
242241 else
243242 {
244243 if (SD_MMC.exists (settingsFileName))
245- SD_MMC.remove (settingsFileName);
244+ SD_MMC.remove (settingsFileName);
246245 }
247246#endif
248247 }
@@ -331,15 +330,15 @@ void factoryReset()
331330 {
332331 // Remove this specific settings file. Don't remove the other profiles.
333332 sd->remove (settingsFileName);
334-
333+
335334 sd->remove (stationCoordinateECEFFileName); // Remove station files
336335 sd->remove (stationCoordinateGeodeticFileName);
337336 }
338337#ifdef COMPILE_SD_MMC
339338 else
340339 {
341340 SD_MMC.remove (settingsFileName);
342-
341+
343342 SD_MMC.remove (stationCoordinateECEFFileName); // Remove station files
344343 SD_MMC.remove (stationCoordinateGeodeticFileName);
345344 }
@@ -404,11 +403,12 @@ void menuRadio()
404403
405404 systemPrintln (" 2) Pair radios" );
406405 systemPrintln (" 3) Forget all radios" );
407- #ifdef ENABLE_DEVELOPER
408- systemPrintln (" 4) Add dummy radio" );
409- systemPrintln (" 5) Send dummy data" );
410- systemPrintln (" 6) Broadcast dummy data" );
411- #endif
406+ if (ENABLE_DEVELOPER)
407+ {
408+ systemPrintln (" 4) Add dummy radio" );
409+ systemPrintln (" 5) Send dummy data" );
410+ systemPrintln (" 6) Broadcast dummy data" );
411+ }
412412 }
413413
414414 systemPrintln (" x) Exit" );
@@ -439,8 +439,7 @@ void menuRadio()
439439 systemPrintln (" Radios forgotten" );
440440 }
441441 }
442- #ifdef ENABLE_DEVELOPER
443- else if (settings.radioType == RADIO_ESPNOW && incoming == 4 )
442+ else if (ENABLE_DEVELOPER && settings.radioType == RADIO_ESPNOW && incoming == 4 )
444443 {
445444 uint8_t peer1[] = {0xB8 , 0xD6 , 0x1A , 0x0D , 0x8F , 0x9C }; // Random MAC
446445 if (esp_now_is_peer_exist (peer1) == true )
@@ -459,18 +458,17 @@ void menuRadio()
459458
460459 espnowSetState (ESPNOW_PAIRED);
461460 }
462- else if (settings.radioType == RADIO_ESPNOW && incoming == 5 )
461+ else if (ENABLE_DEVELOPER && settings.radioType == RADIO_ESPNOW && incoming == 5 )
463462 {
464463 uint8_t espnowData[] = " This is the long string to test how quickly we can send one string to the other unit. I am going to need a much longer sentence if I want to get a long amount of data into one transmission. This is nearing 200 characters but needs to be near 250." ;
465464 esp_now_send (0 , (uint8_t *) &espnowData, sizeof (espnowData)); // Send packet to all peers
466465 }
467- else if (settings.radioType == RADIO_ESPNOW && incoming == 6 )
466+ else if (ENABLE_DEVELOPER && settings.radioType == RADIO_ESPNOW && incoming == 6 )
468467 {
469468 uint8_t espnowData[] = " This is the long string to test how quickly we can send one string to the other unit. I am going to need a much longer sentence if I want to get a long amount of data into one transmission. This is nearing 200 characters but needs to be near 250." ;
470469 uint8_t broadcastMac[6 ] = {0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF };
471470 esp_now_send (broadcastMac, (uint8_t *) &espnowData, sizeof (espnowData)); // Send packet to all peers
472471 }
473- #endif
474472
475473 else if (incoming == INPUT_RESPONSE_GETNUMBER_EXIT)
476474 break ;
0 commit comments