mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
* Added backlight settings * Changed location of the brightness setting * Fix row size of brightness settings * [apps/settings/brightness] Update translations * Fix dimmer * Update translations * [apps/settings] Add dimmer duration setting * [apps/settings] Ensure of the brightness level is greater than the dimmed brightness level * Make transition smooth * Removed transition time setting I personally think that this setting is completely useless except if you absolutely want a transition that is not smooth, which is weird. * Moved everything related to brightness in one submenu * Some refactoring * Update defaults * Removed unnecessary translation * [apps/settings] Fix Shift + Minus/Plus in settings * Apply suggestions from code review * [apps/shared] Remove a think that I don't know what it is * Apply review suggestions Co-authored-by: Joachim LF <joachimlf@pm.me> Co-authored-by: lolocomotive <lolocomotive181@gmail.com>
28 lines
523 B
C++
28 lines
523 B
C++
#ifndef ESCHER_TIMER_H
|
|
#define ESCHER_TIMER_H
|
|
|
|
#include <stdint.h>
|
|
|
|
/* Timers we'll need
|
|
* - Blink cursor timer
|
|
* - Dim Screen timer
|
|
* - Power down timer
|
|
* - Watchdog timer ?
|
|
* - Battery level timer
|
|
* - LED blink timer
|
|
*/
|
|
|
|
class Timer {
|
|
public:
|
|
static constexpr int TickDuration = 300; // In Miliseconds
|
|
Timer(uint32_t period); // Period is in ticks
|
|
bool tick();
|
|
void reset(uint32_t NewPeriod = -1);
|
|
protected:
|
|
virtual bool fire() = 0;
|
|
uint32_t m_period;
|
|
uint32_t m_numberOfTicksBeforeFire;
|
|
};
|
|
|
|
#endif
|