prep work for displaying pinout diagrams

This commit is contained in:
KemoNine 2020-09-27 22:50:55 -04:00
parent c7c1dd5129
commit 4c51a6fb7d
15 changed files with 30 additions and 7 deletions

View file

@ -99,6 +99,7 @@ void listPrevious(gslc_tsElemRef*);
//<Save_References !Start!>
gslc_tsElemRef* m_SliderDiagrams = NULL;
gslc_tsElemRef* m_pElemBatteryLevel= NULL;
gslc_tsElemRef* m_pElemImgPin = NULL;
gslc_tsElemRef* m_pElemLsDiagrams = NULL;
gslc_tsElemRef* m_pElemRd1152 = NULL;
gslc_tsElemRef* m_pElemRd96 = NULL;

Binary file not shown.

View file

@ -26,6 +26,11 @@
#include "src/guislice/XProgress.h"
#include "src/guislice/XSlider.h"
#include "src/guislice/XTextbox.h"
// Ensure optional features are enabled in the configuration
#if !(GSLC_SD_EN)
#error "Config: GSLC_SD_EN required for this program but not enabled. Please update GUIslice/config/"
#endif
//<Includes !End!>
// ------------------------------------------------
@ -50,12 +55,12 @@
// Enumerations for pages, elements, fonts, images
// ------------------------------------------------
//<Enum !Start!>
enum {E_PG_BASE,E_PG_MAIN,E_CONF_RPI,E_WIRING,E_SD_CARD};
enum {E_ELEM_BATT_LEVEL,E_ELEM_LS_DIA,E_ELEM_RD96,E_ELEM_RD_1152
,E_ELEM_RD_UART0,E_ELEM_RD_UART5,E_ELEM_RD_UARTA,E_ELEM_STATUS
,E_ELEM_TEXT,E_ELEM_TEXT11,E_ELEM_TEXT3,E_ELEM_TEXT4,E_ELEM_TX96
,E_ELEM_TX_1152,E_ELEM_TX_SD_INFO,E_ELEM_TX_UART1,E_ELEM_TX_UART5
,E_SLR_DIAGRAMS,E_STATUS_LINE};
enum {E_PG_BASE,E_PG_MAIN,E_CONF_RPI,E_WIRING,E_SD_CARD,E_PG_DIAGRAM};
enum {E_ELEM_BATT_LEVEL,E_ELEM_IMG_PIN,E_ELEM_LS_DIA,E_ELEM_RD96
,E_ELEM_RD_1152,E_ELEM_RD_UART0,E_ELEM_RD_UART5,E_ELEM_RD_UARTA
,E_ELEM_STATUS,E_ELEM_TEXT,E_ELEM_TEXT11,E_ELEM_TEXT3
,E_ELEM_TEXT4,E_ELEM_TX96,E_ELEM_TX_1152,E_ELEM_TX_SD_INFO
,E_ELEM_TX_UART1,E_ELEM_TX_UART5,E_SLR_DIAGRAMS,E_STATUS_LINE};
enum {E_GRP_SPD,E_GRP_UART};
// Must use separate enum for fonts with MAX_FONT at end to use gslc_FontSet.
enum {E_AO_NOTOMONO8PT7B,MAX_FONT};
@ -69,7 +74,7 @@ enum {E_AO_NOTOMONO8PT7B,MAX_FONT};
// Define the maximum number of elements and pages
// ------------------------------------------------
//<ElementDefines !Start!>
#define MAX_PAGE 5
#define MAX_PAGE 6
#define MAX_ELEM_PG_BASE 3 // # Elems total on page
#define MAX_ELEM_PG_BASE_RAM MAX_ELEM_PG_BASE // # Elems in RAM
@ -85,6 +90,9 @@ enum {E_AO_NOTOMONO8PT7B,MAX_FONT};
#define MAX_ELEM_SD_CARD 1 // # Elems total on page
#define MAX_ELEM_SD_CARD_RAM MAX_ELEM_SD_CARD // # Elems in RAM
#define MAX_ELEM_PG_DIAGRAM 1 // # Elems total on page
#define MAX_ELEM_PG_DIAGRAM_RAM MAX_ELEM_PG_DIAGRAM // # Elems in RAM
//<ElementDefines !End!>
// ------------------------------------------------
@ -106,6 +114,8 @@ gslc_tsElem m_asPage3Elem[MAX_ELEM_WIRING_RAM];
gslc_tsElemRef m_asPage3ElemRef[MAX_ELEM_WIRING];
gslc_tsElem m_asPage4Elem[MAX_ELEM_SD_CARD_RAM];
gslc_tsElemRef m_asPage4ElemRef[MAX_ELEM_SD_CARD];
gslc_tsElem m_asPopup1Elem[MAX_ELEM_PG_DIAGRAM_RAM];
gslc_tsElemRef m_asPopup1ElemRef[MAX_ELEM_PG_DIAGRAM];
gslc_tsXProgress m_sXBarGauge2;
gslc_tsXTextbox m_sTextbox1;
char m_acTextboxBuf1[952]; // NRows=17 NCols=56
@ -133,6 +143,7 @@ char m_acTextboxBuf3[696]; // NRows=12 NCols=58
//<Extern_References !Start!>
extern gslc_tsElemRef* m_SliderDiagrams;
extern gslc_tsElemRef* m_pElemBatteryLevel;
extern gslc_tsElemRef* m_pElemImgPin;
extern gslc_tsElemRef* m_pElemLsDiagrams;
extern gslc_tsElemRef* m_pElemRd1152;
extern gslc_tsElemRef* m_pElemRd96;
@ -183,6 +194,7 @@ void InitGUIslice_gen()
gslc_PageAdd(&m_gui,E_CONF_RPI,m_asPage2Elem,MAX_ELEM_CONF_RPI_RAM,m_asPage2ElemRef,MAX_ELEM_CONF_RPI);
gslc_PageAdd(&m_gui,E_WIRING,m_asPage3Elem,MAX_ELEM_WIRING_RAM,m_asPage3ElemRef,MAX_ELEM_WIRING);
gslc_PageAdd(&m_gui,E_SD_CARD,m_asPage4Elem,MAX_ELEM_SD_CARD_RAM,m_asPage4ElemRef,MAX_ELEM_SD_CARD);
gslc_PageAdd(&m_gui,E_PG_DIAGRAM,m_asPopup1Elem,MAX_ELEM_PG_DIAGRAM_RAM,m_asPopup1ElemRef,MAX_ELEM_PG_DIAGRAM);
// Now mark E_PG_BASE as a "base" page which means that it's elements
// are always visible. This is useful for common page elements.
@ -338,6 +350,16 @@ void InitGUIslice_gen()
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_GRAY_LT3);
gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_GRAY,GSLC_COL_BLACK,GSLC_COL_BLACK);
m_pElemSDInfo = pElemRef;
// -----------------------------------
// PAGE: E_PG_DIAGRAM
// Create E_ELEM_IMG_PIN using Image
pElemRef = gslc_ElemCreateImg(&m_gui,E_ELEM_IMG_PIN,E_PG_DIAGRAM,(gslc_tsRect){0,0,320,240},
gslc_GetImageFromSD(NULL,GSLC_IMGREF_FMT_RAW1));
gslc_ElemSetFillEn(&m_gui,pElemRef,false);
m_pElemImgPin = pElemRef;
//<InitGUI !End!>
//<Startup !Start!>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB