mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-10 07:10:42 +00:00
use internal seconds since reset only when wifi not enabled
This commit is contained in:
parent
3854593bf7
commit
876d860a05
@ -145,13 +145,13 @@ void loop() {
|
||||
|
||||
timeClient.update(); //update internal clock if possible
|
||||
#endif
|
||||
#ifndef USE_WIFI
|
||||
unsigned long current_millis = millis();
|
||||
if(current_millis-last_millis >= 1000){
|
||||
seconds_since_reset+=(current_millis-last_millis)/1000;
|
||||
last_millis=current_millis;
|
||||
}
|
||||
#endif
|
||||
#ifndef USE_WIFI
|
||||
unsigned long current_millis = millis();
|
||||
if(current_millis-last_millis >= 1000){
|
||||
seconds_since_reset+=(current_millis-last_millis)/1000;
|
||||
last_millis=current_millis;
|
||||
}
|
||||
#endif
|
||||
if (newData) {
|
||||
switch (newData) {
|
||||
case event_espnowg:
|
||||
|
Loading…
Reference in New Issue
Block a user