added tone request gateway before actually swithcing the pin

This commit is contained in:
Flo
2025-12-08 19:24:47 +01:00
commit f0e8b49854
68 changed files with 11057 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
/*
* Seconds.cpp
*
* Created on: 10.09.2020
* Author: flori
*/
#include "Seconds.h"
uint32_t Seconds::lastMillisShifted = 0;
uint32_t Seconds::seconds = 0;
uint32_t Seconds::secondsOverflow = 0;
boolean volatile Seconds::semaphore = false;
uint32_t Seconds::Get(void)
{
uint32_t secRet;
uint32_t secNow = millis() / 1000;
if (secNow < seconds)
{
secondsOverflow += seconds + 1;
}
seconds = secNow;
secRet = seconds + secondsOverflow;
return secRet;
}