@@ -82,7 +82,7 @@ NetworkConnectionState NBConnectionHandler::check() {
8282 unsigned long const now = millis ();
8383 int nbAccessAlive;
8484 if (now - lastConnectionTickTime > connectionTickTimeInterval) {
85- switch (netConnectionState ) {
85+ switch (_netConnectionState ) {
8686 case NetworkConnectionState::INIT: {
8787 init ();
8888 }
@@ -96,7 +96,7 @@ NetworkConnectionState NBConnectionHandler::check() {
9696 if (networkStatus == NB_NetworkStatus_t::ERROR) {
9797 // NO FURTHER ACTION WILL FOLLOW THIS
9898 changeConnectionState (NetworkConnectionState::ERROR);
99- return netConnectionState ;
99+ return _netConnectionState ;
100100 }
101101 Debug.print (DBG_INFO, " Sending PING to outer space..." );
102102 int pingResult;
@@ -106,11 +106,11 @@ NetworkConnectionState NBConnectionHandler::check() {
106106 if (pingResult < 0 ) {
107107 Debug.print (DBG_ERROR, " PING failed" );
108108 Debug.print (DBG_INFO, " Retrying in \" %d\" milliseconds" , connectionTickTimeInterval);
109- return netConnectionState ;
109+ return _netConnectionState ;
110110 } else {
111111 Debug.print (DBG_INFO, " Connected to GPRS Network" );
112112 changeConnectionState (NetworkConnectionState::CONNECTED);
113- return netConnectionState ;
113+ return _netConnectionState ;
114114 }
115115 }
116116 break ;
@@ -119,7 +119,7 @@ NetworkConnectionState NBConnectionHandler::check() {
119119 Debug.print (DBG_VERBOSE, " GPRS.isAccessAlive(): %d" , nbAccessAlive);
120120 if (nbAccessAlive != 1 ) {
121121 changeConnectionState (NetworkConnectionState::DISCONNECTED);
122- return netConnectionState ;
122+ return _netConnectionState ;
123123 }
124124 Debug.print (DBG_VERBOSE, " Connected to Cellular Network" );
125125 }
@@ -139,7 +139,7 @@ NetworkConnectionState NBConnectionHandler::check() {
139139 lastConnectionTickTime = now;
140140 }
141141
142- return netConnectionState ;
142+ return _netConnectionState ;
143143}
144144
145145/* *****************************************************************************
@@ -171,7 +171,7 @@ void NBConnectionHandler::changeConnectionState(NetworkConnectionState _newState
171171 nbAccess.shutdown ();
172172 }
173173 case NetworkConnectionState::DISCONNECTED: {
174- if (netConnectionState == NetworkConnectionState::CONNECTED) {
174+ if (_netConnectionState == NetworkConnectionState::CONNECTED) {
175175 execCallback (NetworkConnectionEvent::DISCONNECTED, 0 );
176176 Debug.print (DBG_ERROR, " Disconnected from Cellular Network" );
177177 Debug.print (DBG_ERROR, " Attempting reconnection" );
@@ -190,12 +190,12 @@ void NBConnectionHandler::changeConnectionState(NetworkConnectionState _newState
190190 }
191191 connectionTickTimeInterval = newInterval;
192192 lastConnectionTickTime = millis ();
193- netConnectionState = _newState;
193+ _netConnectionState = _newState;
194194}
195195
196196
197197void NBConnectionHandler::connect () {
198- if (netConnectionState == NetworkConnectionState::INIT || netConnectionState == NetworkConnectionState::CONNECTING) {
198+ if (_netConnectionState == NetworkConnectionState::INIT || _netConnectionState == NetworkConnectionState::CONNECTING) {
199199 return ;
200200 }
201201 keepAlive = true ;
0 commit comments