You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO - this is not currently working as intended - always reading 0 from the file. We should probably make a unified approach for both the cleaning and the VOCstate
372
372
loadCleaningState();
373
-
LOG_INFO("Last cleaning time: %u", lastCleaning);
373
+
LOG_INFO("SEN5X: Last cleaning time: %u", lastCleaning);
374
374
if (lastCleaning) {
375
-
LOG_INFO("Last cleaning is valid");
375
+
LOG_INFO("SEN5X: Last cleaning is valid");
376
376
377
377
uint32_t now;
378
378
now = getTime();
379
-
LOG_INFO("Current time %us", now);
379
+
LOG_INFO("SEN5X: Current time %us", now);
380
380
uint32_t passed = now - lastCleaning;
381
-
LOG_INFO("Elapsed time since last cleaning: %us", passed);
381
+
LOG_INFO("SEN5X: Elapsed time since last cleaning: %us", passed);
382
382
383
383
if (passed > ONE_WEEK_IN_SECONDS && (now > 1514764800)) { // If current date greater than 01/01/2018 (validity check)
384
384
LOG_INFO("SEN5X: More than a week since las cleaning, cleaning...");
385
385
startCleaning();
386
386
} else {
387
-
LOG_INFO("Last cleaning date (in epoch): %u", lastCleaning);
387
+
LOG_INFO("SEN5X: Last cleaning date (in epoch): %u", lastCleaning);
388
388
}
389
389
} else {
390
-
LOG_INFO("Last cleaning is not valid");
390
+
LOG_INFO("SEN5X: Last cleaning is not valid");
391
391
// We asume the device has just been updated or it is new, so no need to trigger a cleaning.
392
392
// Just save the timestamp to do a cleaning one week from now.
0 commit comments