- glcdsetup: localize clock options

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2020-06-14 18:44:44 +02:00
committed by Thilo Graf
parent e10be35000
commit d6b0cf6b49
7 changed files with 23 additions and 7 deletions

View File

@@ -240,9 +240,9 @@ void nGLCD::Exec() {
if (percent_time_standby) {
std::string Time;
if (g_settings.glcd_time_in_standby == 3)
if (g_settings.glcd_time_in_standby == CLOCK_ANALOG)
LcdAnalogClock(bitmap->Width()/2, bitmap->Height()/2, 200);
else if (g_settings.glcd_time_in_standby == 2)
else if (g_settings.glcd_time_in_standby == CLOCK_DIGITAL_HMS)
Time = strftime("%H:%M:%S", tm);
else
Time = strftime("%H:%M", tm);
@@ -795,7 +795,7 @@ void nGLCD::Update() {
void nGLCD::StandbyMode(bool b) {
if (nglcd) {
if (g_settings.glcd_time_in_standby) {
if (g_settings.glcd_time_in_standby != CLOCK_OFF) {
nglcd->doStandbyTime = b;
nglcd->doStandby = false;
} else {

View File

@@ -114,6 +114,14 @@ class nGLCD
static void Lock();
static void Unlock();
public:
enum
{
CLOCK_OFF = 0,
CLOCK_DIGITAL_HM = 1,
CLOCK_DIGITAL_HMS = 2,
CLOCK_ANALOG = 3
};
nGLCD();
~nGLCD();
void DeInit();