-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Description
Describe the bug
I am trying to add an element alias to reuse a toggle button from one page to another. I followed the tips & tricks page instructions here, and the alias line I entered in the GUIslice.h include file is:
gslc_ElemAdd(&m_gui, E_PG_RUN2, gslc_GetElemFromRef(&m_gui, m_pElemToggle1), GSLC_ELEMREF_DEFAULT);
but I am getting the below error while compiling.
Device hardware
- MCU: Adafruit Metro M0 Express (SAMD21 - Arm Cortex M0+)
- Display with link: Adafruit ILI9341 2.8" resistive (https://www.adafruit.com/product/1770)
- GUIslice config selected: Custom (as previously posted in closed issue Detect a button press in a while loop #509)
Expected behavior
Should compile fine? Not sure why it is complaining about an int conversion.
Initialization messages
In file included from include/GUISLICE_REV2_GSLC.h:18,
from src/main.cpp:15:
include/GUISLICE_REV2_GSLC.h: In function 'void InitGUIslice_gen()':
.pio/libdeps/adafruit_metro_m0/GUIslice/src/GUIslice.h:453:53: error: invalid conversion from 'int' to 'gslc_teElemRefFlags' [-fpermissive]
453 | #define GSLC_ELEMREF_DEFAULT (GSLC_ELEMREF_SRC_RAM | GSLC_ELEMREF_VISIBLE)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/GUISLICE_REV2_GSLC.h:663:80: note: in expansion of macro 'GSLC_ELEMREF_DEFAULT'
663 | gslc_ElemAdd(&m_gui, E_PG_RUN2, gslc_GetElemFromRef(&m_gui, m_pElemToggle1), GSLC_ELEMREF_DEFAULT);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/GUISLICE_REV2_GSLC.h:18,
from src/main.cpp:15:
.pio/libdeps/adafruit_metro_m0/GUIslice/src/GUIslice.h:3471:102: note: initializing argument 4 of 'gslc_tsElemRef* gslc_ElemAdd(gslc_tsGui*, int16_t, gslc_tsElem*, gslc_teElemRefFlags)'
3471 | gslc_tsElemRef* gslc_ElemAdd(gslc_tsGui* pGui,int16_t nPageId,gslc_tsElem* pElem,gslc_teElemRefFlags eFlags);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~
src/main.cpp: In function 'bool CbCheckbox(void*, void*, int16_t, bool)':
Additional info
All help is appreciated, hopefully I am not taking advantage of your good will @Pconti31. I also have a few more issues/questions but I figured I will go one at a time for now.
Metadata
Metadata
Assignees
Labels
No labels