8#ifndef CALCULATETIMEDIFFERENCE_H_
9#define CALCULATETIMEDIFFERENCE_H_
23#define timerCountsInDay 60 * 60 * 24 / (capacityTimer / clockFreq)
25#define toothGearStepper 15.0
26#define toothGearClock 24.0
27#define gearRatio (toothGearClock / toothGearStepper)
28#define stepsFullRotationStepper 2048.0
29#define stepsClockHour (stepsFullRotationStepper * gearRatio)
30#define stepsClockMinute (stepsClockHour / 60.0)
31#define stepsClockSecond (stepsClockMinute / 60.0)
32#define timePerStep (3600.0 / (stepsFullRotationStepper * gearRatio))
33#define stepsToggleThreshold 20
34#define clockWraparoundThresholdSec (10 * 60)
35#define stepsWrap (stepsClockHour * 24)
36#define secondsInDay 86400
37#define stepsInDay (stepsClockSecond * secondsInDay)
uint32_t timeOfLastDcfMessage
uint32_t timeSinceLastCompleteDcfMessage
void storeTimeLastCompleteDcfMessage()
double mechanicalTimeFloat
bool toggleCalculateTimeDifference
void calculateTimeDifference()
calculate the difference between the mechanical time and the current time to have the time difference...
volatile bool toggleTimer1Direction
void resetTimeKeeping()
Reset the time settings on startup, gets called from main()
uint32_t calculateStepsToTake()