diff --git a/src/Braccio++.cpp b/src/Braccio++.cpp index e322681..8b1f842 100644 --- a/src/Braccio++.cpp +++ b/src/Braccio++.cpp @@ -1,5 +1,4 @@ #include "Braccio++.h" -//#include "menu.impl" #if LVGL_VERSION_MAJOR < 8 || (LVGL_VERSION_MAJOR == 8 && LVGL_VERSION_MINOR < 1) #error Please use lvgl >= 8.1 diff --git a/src/Braccio++.h b/src/Braccio++.h index 9c50d40..1ca2c37 100644 --- a/src/Braccio++.h +++ b/src/Braccio++.h @@ -7,16 +7,7 @@ #include "lib/display/Backlight.h" #include "lib/motors/SmartServo.h" #include "drivers/Ticker.h" -/* -#include "lib/PCINT/src/pcint.h" -#include "lib/ArduinoMenu/src/menu.h" -#include "lib/ArduinoMenu/src/menuIO/TFT_eSPIOut.h" -#include "lib/ArduinoMenu/src/menuIO/interruptPins.h" -#include "lib/ArduinoMenu/src/menuIO/keyIn.h" -#include "lib/ArduinoMenu/src/menuIO/chainStream.h" -#include "lib/ArduinoMenu/src/menuIO/serialOut.h" -#include "lib/ArduinoMenu/src/menuIO/serialIn.h" -*/ + #include "lib/TFT_eSPI/TFT_eSPI.h" // Hardware-specific library #include diff --git a/src/menu.impl b/src/menu.impl deleted file mode 100644 index 86fe4f3..0000000 --- a/src/menu.impl +++ /dev/null @@ -1,81 +0,0 @@ -/* - UGLY MENU STUFF -*/ - -namespace braccio { - -const int BTN_LEFT = 5; -const int BTN_RIGHT = 4; -const int BTN_UP = 2; -const int BTN_DOWN = 3; -const int BTN_SEL = A0; -const int BTN_ENTER = A1; - -TFT_eSPI gfx = TFT_eSPI(); - -static int selTest = 0; -static SELECT(selTest, selMenu, "Select", doNothing, noEvent, noStyle - , VALUE("Zero", 0, doNothing, noEvent) - , VALUE("One", 1, doNothing, noEvent) - , VALUE("Two", 2, doNothing, noEvent) - ); - -static int chooseTest = -1; -static CHOOSE(chooseTest, chooseMenu, "Choose", doNothing, noEvent, noStyle - , VALUE("First", 1, doNothing, noEvent) - , VALUE("Second", 2, doNothing, noEvent) - , VALUE("Third", 3, doNothing, noEvent) - , VALUE("Last", -1, doNothing, noEvent) - ); - -static MENU(subMenu, "Sub-Menu", doNothing, noEvent, noStyle - , OP("Op", doNothing, noEvent) - , EXIT(" colors[6] MEMMODE = { - {{ TFT_BLACK, TFT_BLACK}, {TFT_BLACK, TFT_BLUE, TFT_BLUE}}, //bgColor - {{ TFT_GRAY, TFT_GRAY}, {TFT_WHITE, TFT_WHITE, TFT_WHITE}}, //fgColor - {{ TFT_WHITE, TFT_BLACK}, {TFT_YELLOW, TFT_YELLOW, TFT_RED}}, //valColor - {{ TFT_WHITE, TFT_BLACK}, {TFT_WHITE, TFT_YELLOW, TFT_YELLOW}}, //unitColor - {{ TFT_WHITE, TFT_GRAY}, {TFT_BLACK, TFT_BLUE, TFT_WHITE}}, //cursorColor - {{ TFT_WHITE, TFT_YELLOW}, {TFT_BLUE, TFT_RED, TFT_RED}}, //titleColor -}; - -static serialIn serial(Serial); - -static encoderIn encoder; -static encoderInStream encStream(encoder); -static MENU_INPUTS(in, &encStream, &serial); - -#define fontW 7 -#define fontH 18 -#define MAX_DEPTH 4 -#define GFX_WIDTH 240 -#define GFX_HEIGHT 240 - -idx_t serialTops[MAX_DEPTH]={0}; -serialOut outSerial(Serial,serialTops); - -const panel panels[] MEMMODE = {{0, 0, GFX_WIDTH / fontW, GFX_HEIGHT / fontH}}; -navNode* nodes[sizeof(panels) / sizeof(panel)]; //navNodes to store navigation status -panelsList pList(panels, nodes, 1); //a list of panels and nodes -idx_t eSpiTops[MAX_DEPTH]={0}; -TFT_eSPIOut eSpiOut(gfx,colors,eSpiTops,pList,fontW,fontH+1); -menuOut* constMEM outputs[] MEMMODE={&outSerial,&eSpiOut};//list of output devices -outputsList out(outputs,sizeof(outputs)/sizeof(menuOut*));//outputs list controller - -static NAVROOT(nav, mainMenu, MAX_DEPTH, in, out); -} \ No newline at end of file