This commit is contained in:
2021-03-04 15:30:09 +01:00
parent 0ad3cba113
commit 1796830059

View File

@ -90,7 +90,12 @@ int main (void) {
uint32_t current_milliseconds = timestamp.tv_nsec / 1e6;
// add averaging and forming the struct here
logmsg(LOG_DEBUG, "s: %lu, ns: %lu, p: %lu", current_seconds, current_milliseconds, period);
uint32_t duration = (current_seconds - last_seconds) + (current_milliseconds - last_milliseconds);
logmsg(LOG_DEBUG, "s: %lu, ns: %lu, d: %lu, p: %lu", current_seconds, current_milliseconds, duration, period);
last_seconds = current_seconds;
last_milliseconds = current_milliseconds;
ledTick++;
if (ledTick == 50) {