@@ -70,7 +70,7 @@ esp_err_t espNowAddPeer(const uint8_t * peerMac)
70
70
// Get the current ESP-NOW state
71
71
ESPNOWState espnowGetState ()
72
72
{
73
- return espnowState ;
73
+ return espNowState ;
74
74
}
75
75
76
76
// ----------------------------------------------------------------------
@@ -480,15 +480,15 @@ void updateEspnow()
480
480
{
481
481
if (settings.enableEspNow == true )
482
482
{
483
- if (espnowState == ESPNOW_PAIRED || espnowState == ESPNOW_BROADCASTING)
483
+ if (espNowState == ESPNOW_PAIRED || espNowState == ESPNOW_BROADCASTING)
484
484
{
485
485
// If it's been longer than a few ms since we last added a byte to the buffer
486
486
// then we've reached the end of the RTCM stream. Send partial buffer.
487
487
if (espnowOutgoingSpot > 0 && (millis () - espnowLastAdd) > 50 )
488
488
{
489
- if (espnowState == ESPNOW_PAIRED)
489
+ if (espNowState == ESPNOW_PAIRED)
490
490
esp_now_send (0 , (uint8_t *)&espnowOutgoing, espnowOutgoingSpot); // Send partial packet to all peers
491
- else // if (espnowState == ESPNOW_BROADCASTING)
491
+ else // if (espNowState == ESPNOW_BROADCASTING)
492
492
{
493
493
uint8_t broadcastMac[6 ] = {0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF };
494
494
esp_now_send (broadcastMac, (uint8_t *)&espnowOutgoing,
@@ -525,7 +525,7 @@ void espnowOnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status)
525
525
// Callback when data is received
526
526
void espnowOnDataReceived (const esp_now_recv_info *mac, const uint8_t *incomingData, int len)
527
527
{
528
- if (espnowState == ESPNOW_PAIRING)
528
+ if (espNowState == ESPNOW_PAIRING)
529
529
{
530
530
if (len == sizeof (ESP_NOW_PAIR_MESSAGE)) // First error check
531
531
{
@@ -605,7 +605,7 @@ void espnowStart()
605
605
if (response != ESP_OK)
606
606
systemPrintf (" espnowStart: Failed to get protocols: %s\r\n " , esp_err_to_name (response));
607
607
608
- if ((WIFI_IS_RUNNING () == false ) && espnowState == ESPNOW_OFF)
608
+ if ((WIFI_IS_RUNNING () == false ) && espNowState == ESPNOW_OFF)
609
609
{
610
610
// Radio is off, turn it on
611
611
if (protocols != (WIFI_PROTOCOL_LR))
@@ -626,7 +626,7 @@ void espnowStart()
626
626
}
627
627
}
628
628
// If WiFi is on but ESP NOW is off, then enable LR protocol
629
- else if (WIFI_IS_RUNNING () && espnowState == ESPNOW_OFF)
629
+ else if (WIFI_IS_RUNNING () && espNowState == ESPNOW_OFF)
630
630
{
631
631
// Enable WiFi + ESP-Now
632
632
// Enable long range, PHY rate of ESP32 will be 512Kbps or 256Kbps
@@ -743,7 +743,7 @@ void espnowStart()
743
743
// If WiFi is off, stop the radio entirely
744
744
void espnowStop ()
745
745
{
746
- if (espnowState == ESPNOW_OFF)
746
+ if (espNowState == ESPNOW_OFF)
747
747
return ;
748
748
749
749
// Turn off promiscuous WiFi mode
@@ -831,7 +831,7 @@ void espnowBeginPairing()
831
831
// Regularly call during pairing to see if we've received a Pairing message
832
832
bool espnowIsPaired ()
833
833
{
834
- if (espnowState == ESPNOW_MAC_RECEIVED)
834
+ if (espNowState == ESPNOW_MAC_RECEIVED)
835
835
{
836
836
// Remove broadcast peer
837
837
uint8_t broadcastMac[6 ] = {0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF };
@@ -928,13 +928,13 @@ esp_err_t espnowRemovePeer(uint8_t *peerMac)
928
928
// Update the state of the ESP Now state machine
929
929
void espnowSetState (ESPNOWState newState)
930
930
{
931
- if (espnowState == newState && settings.debugEspNow == true )
931
+ if (espNowState == newState && settings.debugEspNow == true )
932
932
systemPrint (" *" );
933
- espnowState = newState;
933
+ espNowState = newState;
934
934
935
935
if (settings.debugEspNow == true )
936
936
{
937
- systemPrint (" espnowState : " );
937
+ systemPrint (" espNowState : " );
938
938
switch (newState)
939
939
{
940
940
case ESPNOW_OFF:
@@ -964,7 +964,7 @@ void espnowProcessRTCM(byte incoming)
964
964
// If we are paired,
965
965
// Or if the radio is broadcasting
966
966
// Then add bytes to the outgoing buffer
967
- if (espnowState == ESPNOW_PAIRED || espnowState == ESPNOW_BROADCASTING)
967
+ if (espNowState == ESPNOW_PAIRED || espNowState == ESPNOW_BROADCASTING)
968
968
{
969
969
// Move this byte into ESP NOW to send buffer
970
970
espnowOutgoing[espnowOutgoingSpot++] = incoming;
@@ -976,9 +976,9 @@ void espnowProcessRTCM(byte incoming)
976
976
{
977
977
espnowOutgoingSpot = 0 ; // Wrap
978
978
979
- if (espnowState == ESPNOW_PAIRED)
979
+ if (espNowState == ESPNOW_PAIRED)
980
980
esp_now_send (0 , (uint8_t *)&espnowOutgoing, sizeof (espnowOutgoing)); // Send packet to all peers
981
- else // if (espnowState == ESPNOW_BROADCASTING)
981
+ else // if (espNowState == ESPNOW_BROADCASTING)
982
982
{
983
983
uint8_t broadcastMac[6 ] = {0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF };
984
984
esp_now_send (broadcastMac, (uint8_t *)&espnowOutgoing,
@@ -1041,7 +1041,7 @@ void espnowStaticPairing()
1041
1041
// Returns the current channel being used by WiFi
1042
1042
uint8_t espnowGetChannel ()
1043
1043
{
1044
- if (espnowState == ESPNOW_OFF)
1044
+ if (espNowState == ESPNOW_OFF)
1045
1045
return 0 ;
1046
1046
1047
1047
bool originalPromiscuousMode = false ;
0 commit comments