- glcdsetup: auto-count structs

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2020-06-26 11:01:47 +02:00
committed by Thilo Graf
parent 94c6a88cc3
commit 3d62e0420f

View File

@@ -39,8 +39,7 @@
#include <neutrino_menue.h>
#include "glcdthemes.h"
#define ONOFFSEC_OPTION_COUNT 6
static const CMenuOptionChooser::keyval ONOFFSEC_OPTIONS[ONOFFSEC_OPTION_COUNT] = {
static const CMenuOptionChooser::keyval ONOFFSEC_OPTIONS[] = {
{ cGLCD::CLOCK_OFF, LOCALE_OPTIONS_OFF },
{ cGLCD::CLOCK_SIMPLE, LOCALE_GLCD_STANDBY_SIMPLE_CLOCK },
{ cGLCD::CLOCK_LED, LOCALE_GLCD_STANDBY_LED_CLOCK },
@@ -48,14 +47,15 @@ static const CMenuOptionChooser::keyval ONOFFSEC_OPTIONS[ONOFFSEC_OPTION_COUNT]
{ cGLCD::CLOCK_DIGITAL, LOCALE_GLCD_STANDBY_DIGITAL_CLOCK },
{ cGLCD::CLOCK_ANALOG, LOCALE_GLCD_STANDBY_ANALOG_CLOCK }
};
#define ONOFFSEC_OPTION_COUNT (sizeof(ONOFFSEC_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
#define ONOFFPRI_OPTION_COUNT 4
static const CMenuOptionChooser::keyval ONOFFPRI_OPTIONS[ONOFFPRI_OPTION_COUNT] = {
{ 0, LOCALE_GLCD_ALIGN_NONE },
{ 1, LOCALE_GLCD_ALIGN_LEFT },
{ 2, LOCALE_GLCD_ALIGN_CENTER },
{ 3, LOCALE_GLCD_ALIGN_RIGHT },
static const CMenuOptionChooser::keyval ONOFFPRI_OPTIONS[] = {
{ cGLCD::ALIGN_NONE, LOCALE_GLCD_ALIGN_NONE },
{ cGLCD::ALIGN_LEFT, LOCALE_GLCD_ALIGN_LEFT },
{ cGLCD::ALIGN_CENTER, LOCALE_GLCD_ALIGN_CENTER },
{ cGLCD::ALIGN_RIGHT, LOCALE_GLCD_ALIGN_RIGHT }
};
#define ONOFFPRI_OPTION_COUNT (sizeof(ONOFFPRI_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
#if 0
#define KEY_GLCD_BLACK 0