|
@ -34,9 +34,9 @@ namespace ah { |
|
|
void setup(bool directStart) { |
|
|
void setup(bool directStart) { |
|
|
mUptime = 0; |
|
|
mUptime = 0; |
|
|
mTimestamp = (directStart) ? 1 : 0; |
|
|
mTimestamp = (directStart) ? 1 : 0; |
|
|
mTsMillis = 0; |
|
|
|
|
|
mMax = 0; |
|
|
mMax = 0; |
|
|
mPrevMillis = millis(); |
|
|
mPrevMillis = millis(); |
|
|
|
|
|
mTsMillis = mPrevMillis % 1000; |
|
|
resetTicker(); |
|
|
resetTicker(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -62,7 +62,7 @@ namespace ah { |
|
|
mUptime += mDiffSeconds; |
|
|
mUptime += mDiffSeconds; |
|
|
if(0 != mTimestamp) { |
|
|
if(0 != mTimestamp) { |
|
|
mTimestamp += mDiffSeconds; |
|
|
mTimestamp += mDiffSeconds; |
|
|
mTsMillis = mMillis % 1000; |
|
|
mTsMillis = mPrevMillis % 1000; |
|
|
} |
|
|
} |
|
|
checkTicker(); |
|
|
checkTicker(); |
|
|
|
|
|
|
|
@ -80,7 +80,6 @@ namespace ah { |
|
|
|
|
|
|
|
|
virtual void setTimestamp(uint32_t ts) { |
|
|
virtual void setTimestamp(uint32_t ts) { |
|
|
mTimestamp = ts; |
|
|
mTimestamp = ts; |
|
|
mTsMillis = millis() % 1000; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool resetEveryById(uint8_t id) { |
|
|
bool resetEveryById(uint8_t id) { |
|
|