diff --git a/main.c b/main.c index 03ee392..c10e2b5 100644 --- a/main.c +++ b/main.c @@ -2285,14 +2285,14 @@ typedef struct version_t { const char *hw_text; } version_t; -#define MAX_VERSION_TEXT 5 -const version_t hw_version_text[MAX_VERSION_TEXT] = +const version_t hw_version_text[] = { { 165, 179, "V0.4.5.1", 1, 0, " ZS405"}, { 180, 195, "V0.4.5.1.1", 2, 0, " ZS405"}, { 250, 350, "V0.4.6", 3, 1, "+ ZS406"}, { 2200, 2299, "V0.5.4", 103, 1, "+ ZS407"}, }; +#define MAX_VERSION_TEXT (sizeof(hw_version_text) / sizeof(hw_version_text[0])) uint16_t hwid = 0; uint16_t hw_if = 0; @@ -2307,7 +2307,7 @@ const char *get_hw_version_text(void) chThdSleepMilliseconds(1); v = adc1_single_read(0); } - for (int i=0; i