-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHysteresis.cpp
More file actions
36 lines (29 loc) · 853 Bytes
/
Copy pathHysteresis.cpp
File metadata and controls
36 lines (29 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
//
//
#include "Hysteresis.h"
void Hysteresis::Begin()
{
}
void Hysteresis::Enter()
{
ObserverManager::notify(&DisplayContentObserver::LeftDisplay, "HYST", FontType::Condensed);
hysteresis = Settings::GetHysteresis();
ObserverManager::notify(&DisplayContentObserver::RightDisplay, String(hysteresis), FontType::Normal);
}
void Hysteresis::Exit()
{
Settings::SaveHysteresis(hysteresis);
}
void Hysteresis::UpButtonPress()
{
hysteresis++;
if (hysteresis > MAX_HYSTERESIS) hysteresis = MAX_HYSTERESIS;
ObserverManager::notify(&DisplayContentObserver::RightDisplay, String(hysteresis), FontType::Normal);
}
void Hysteresis::DownButtonPress()
{
hysteresis--;
if (hysteresis < 1) hysteresis = 1;
ObserverManager::notify(&DisplayContentObserver::RightDisplay, String(hysteresis), FontType::Normal);
}