#ifndef DISPLAY_h_included #define DISPLAY_h_included #include #include "Clock.h" class Display { public: Display(Clock *real, Clock *model): last_reinit_ts(0), realTime(real), modelTime(model), displayClockNameEvery_ms(16000), clockNameDurationTime_ms(1200), doNotShowClockNameBeforeAndAfterMinuteChange_s(2), displayRefresh_ms(200) { showRealTime(); }; void begin(); void loop(); void loopEyeAnimation(); void reInitializeDisplay(); void showRealTime() { showRealTimeFlag=true; currentTime = realTime; }; void showModelTime() { showRealTimeFlag=false; currentTime = modelTime; }; void setClockNameDurationTime_ms(unsigned long val) { clockNameDurationTime_ms=val; }; void setClockNameDisplayEvery_ms(unsigned long val) { displayClockNameEvery_ms=val; }; void print(const char *s); void print(const String s); protected: unsigned long last_reinit_ts; Clock *realTime, *modelTime, *currentTime; boolean showRealTimeFlag; unsigned long displayClockNameEvery_ms; unsigned long clockNameDurationTime_ms; unsigned int doNotShowClockNameBeforeAndAfterMinuteChange_s; unsigned long displayRefresh_ms; }; #endif