From 7a0e3634bca0ca850a39c4a4c5209695bff0b308 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sat, 12 Sep 2020 22:59:21 -0400 Subject: [PATCH] Update UI to be more consistent, further implementation of sd card page / pop-up --- hardware/_controller/_controller.ino | 56 +++++++++++- hardware/_controller/_controller.prj | Bin 8469 -> 10976 bytes hardware/_controller/_controller_GSLC.h | 81 ++++++++++++++---- .../src/guislice/GUIslice_drv_adagfx.cpp | 4 +- .../src/guislice/ard-adagfx-ili9341-notouch.h | 10 +-- .../guislice/ard-adagfx-ili9341-stmpe610.h | 6 +- 6 files changed, 132 insertions(+), 25 deletions(-) diff --git a/hardware/_controller/_controller.ino b/hardware/_controller/_controller.ino index a7104bc..9737343 100644 --- a/hardware/_controller/_controller.ino +++ b/hardware/_controller/_controller.ino @@ -26,6 +26,13 @@ // Various local includes #include "_controller_GSLC.h" +// SD Card stuff +// The adagfx driver was updated to be able to retun a reference to the sd card +// This will NOT work w/o the driver tweak +// The implementation of gslc_GetSDCard only lives in the ada cpp driver so we need to extern it here +#include "src/SdFat/SdFat.h" +extern SdFat SD; + // // ------------------------------------------------ @@ -75,15 +82,19 @@ Adafruit_NeoPixel pixels_wing(PIXELS_NUM_WING, PIXELS_WING_PIN, NEO_GRB + NEO_KH // GUI state globals bool textChanged = false; +bool popupOnScreen = false; // Various loop handlers void handlerKeyboard(); void handlerBatteryLevel(); void processRingBuffer(); +void sdCardInfo(); // Save some element references for direct access // gslc_tsElemRef* m_pElemBatteryLevel= NULL; +gslc_tsElemRef* m_pElemBtSDNo = NULL; +gslc_tsElemRef* m_pElemBtSDYes = NULL; gslc_tsElemRef* m_pElemRd1152 = NULL; gslc_tsElemRef* m_pElemRd96 = NULL; gslc_tsElemRef* m_pElemRdUART0 = NULL; @@ -116,6 +127,16 @@ bool CbBtnCommon(void* pvGui,void *pvElemRef,gslc_teTouch eTouch,int16_t nX,int1 switch (pElem->nId) { //