From 66a9d823084fb9de3703e3950b94cb9f53c8237b Mon Sep 17 00:00:00 2001 From: Reed Nightingale Date: Sun, 9 Feb 2020 16:17:18 -0800 Subject: [PATCH] Set size variable for main menu button array --- menu_main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/menu_main.cpp b/menu_main.cpp index 518525f..4f7d71d 100644 --- a/menu_main.cpp +++ b/menu_main.cpp @@ -3,6 +3,7 @@ #include #include "button.h" +#include "menu_utils.h" #include "morse.h" #include "settings.h" #include "ubitx.h"//THRESHOLD_USB_LSB @@ -24,6 +25,7 @@ bool mainMenuSelecting = false;//Tracks if we're selecting buttons with knob, or uint8_t mainMenuSelectedItemRaw = 0; const Button mainMenuButtons [] PROGMEM = {}; +static constexpr uint8_t MAIN_MENU_NUM_BUTTONS = sizeof(mainMenuButtons) / sizeof(mainMenuButtons[0]); void drawMainMenu(void) {