mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-10 07:10:42 +00:00
only count seconds_since_reset when logging is enabled
This commit is contained in:
parent
f29e7ce916
commit
48d2a6f012
@ -145,7 +145,7 @@ void loop() {
|
||||
|
||||
timeClient.update(); //update internal clock if possible
|
||||
#endif
|
||||
#ifndef USE_WIFI
|
||||
#if defined (USE_SD_LOG) || defined (USE_FS_LOG)
|
||||
unsigned long current_millis = millis();
|
||||
if(current_millis-last_millis >= 1000){
|
||||
seconds_since_reset+=(current_millis-last_millis)/1000;
|
||||
|
@ -88,12 +88,9 @@ uint8_t LoRa2[] = {mac_prefix[3], mac_prefix[4], LORA2_PEER};
|
||||
//uint8_t LoRaAddress[] = {0x42, 0x00};
|
||||
#endif
|
||||
|
||||
#ifndef USE_WIFI
|
||||
#if defined (USE_SD_LOG) || defined (USE_FS_LOG)
|
||||
unsigned long last_millis = 0;
|
||||
unsigned long seconds_since_reset = 0;
|
||||
#endif
|
||||
|
||||
#if defined (USE_SD_LOG) || defined (USE_FS_LOG)
|
||||
char logBuffer[512];
|
||||
uint16_t logBufferPos = 0; // datatype depends on size of sdBuffer
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user