Releases: ImpulseAdventure/GUIslice
Releases · ImpulseAdventure/GUIslice
Support Arduino debug output
- Add:
InitDebug()
to support redirection of debug output toSerial
/stderr
- Change:
debug_print()
renamed toGSLC_DEBUG_PRINT()
- Change: Improved RAM consumption on Arduino
- Change: Example code enables debug output, cleaned up error handling
- Change: Enable debugging output by default in Config (
DEBUG_ERR 1
), set to0
to reduce memory - Migration Notes (from 0.8.2):
- To enable debug output:
- Add user
DebugOut()
function - Call
gslc_InitDebug()
at start of code - Please refer to example code for details
- Add user
- To enable debug output:
Support elements in Flash memory
- Add: Significant RAM savings with Flash-based elements, making it possible to use smaller Arduino CPUs.
- Add: Element collections support read-only elements stored in Flash memory (
PROGMEM
). - Add: Element Reference type defines where the elements are located (eg.
tsPage
's internal element array in RAM or external Flash memory). - Add:
ElemCreate*_P()
macros to build read-only elements in Flash - Change: Some Arduino sketches use
ElemCreate*_P()
macros to select Flash memory for elements, reducing RAM consumption considerably.
- Add: Element collections support read-only elements stored in Flash memory (
- Change: Arduino sketches moved main loop code into
loop()
- Fix: Clipping of points fixed:
ClipPt()
- Change: Element drawing reduce flicker in frame:
ElemDrawByRef()
- Migration Notes (from 0.8.1):
- Add an element reference array static/global (array of
gslc_tsElemRef
).- Previously, a static/global element array would have been allocated as follows:
gslc_tsElem m_asPageElem[MAX_ELEM];
- With this version, an element reference array must also be allocated. If Flash memory is not being used for elements, the array bounds can be the same as the element array. For example:
gslc_tsElemRef m_asPageElemRef[MAX_ELEM];
- See example code for details
- Previously, a static/global element array would have been allocated as follows:
PageAdd()
adds two parameters (element reference array and total element count).- To take advantage of Flash-based elements, see example
/arduino/gslc_ex07_ard/
- Add an element reference array static/global (array of
UPDATE: As of commit 67f3a93 (2017/01/08), all CPUs (eg. Feather M0) can use ElemCreate*_P() macros (even if PROGMEM is not supported).
Enhancements for Arduino
- Add support for element text strings in Flash (
PROGMEM
)- Add
ElemSetTxtMem()
- Add
tsElem.eTxtFlags
- Add
- GUIslice tested with:
- Raspberry Pi: PiTFT 2.8" Capacitive (SDL1.2)
- Raspberry Pi: PiTFT 2.8" Capacitive (SDL2.0)
- Adafruit Feather M0 (Cortex M0): Adafruit 2.2" TFT breakout
- Arduino (Pro Mini ATmega328P): Adafruit 2.2" TFT breakout
- Arduino (ATmega2560): Adafruit 2.2" TFT breakout
- Arduino (ATmega2560): Adafruit 2.8" TFT resistive touch shield
- Many enhancements for Arduino support
- Add support for image backgrounds
- Add support for STMPE610 touch driver
- Port all examples to Arduino
- Other enhancements
- Add
ElemGetRedraw()
- Add
CollectGetRedraw()
- Prevent unnecessary redraw in some functions
- Fixed range checking of maximum elements
- Add
- Migration Notes (from v0.8)
- No changes to public APIs
- Changes to developer APIs:
- Change param to include
eTxtFlags
:DrvDrawTxt()
,DrvGetTxtSize()
- Change param to include
Add support for Arduino!
- Added support for Arduino via Adafruit-GFX library
- Created
/arduino
directory, including a few example sketches - Initial display driver support: ILI9341
- Display and touch driver selection is done in
GUIslice_config.h
. Config also needs to be modified to match board/shield pinout. - This is an early release for Arduino -- more functionality, drivers, documentation and examples to come
- Note that standard Arduino processors have limited RAM (<2KB). Therefore, if a large number of elements are required, it is recommended to select larger options such as an ATmega2560.
- Created
- Added Image References (
tsImgRef
).- Image References contain information associated with an image to be rendered (source, file format, etc.) and support delayed loading.
- Add: Support for loading images from SD card via SPI interface
- Add:
ResetImage()
,GetImageFromFile()
,GetImageFromSD()
,GetImageFromRam()
,GetImageFromProg()
.
- Touch handling partitioned into support via display driver and support via external touch driver
InitTs()
removed (Init()
automatically callsInitTouch()
)- Add:
InitTouch()
,GetTouch()
- Optimized memory consumption
- Note that Element IDs are now
int16_t
- Note that Element IDs are now
- Text strings add support for external buffers
- Text strings now support two modes of operation: internal/local fixed-length buffers (same as prior releases) or external variable-length buffers
- This change enables fine-grained control over memory consumption associated with textual elements. The new mode is selected via
GSLC_LOCAL_STR=0
. RPI/LINUX users will likely want to continue with the internal buffer mode.
- Misc fixes
FontAdd()
range checkingElemSetTxtStr()
only redraws if changedElemXGaugeDraw()
eliminates redraw flicker
- Config changes
- Add:
GSLC_LOCAL_STR
- Add:
DRV_DISP_ADAGFX
,ADAGFX_*
- Add:
DRV_TOUCH_*
- Rename:
GSLC_ELEM_STRLEN_MAX
toGSLC_LOCAL_STR_LEN
- Add:
- Migration Notes (Public APIs)
ElemCreateBtnImg()
,ElemCreateImg()
,ElemSetImage()
,SetBkgndImage()
now usetsImgRef
instead of image filename. Create an image reference withGetImageFrom*()
ElemCreateTxt()
,ElemCreateBtnTxt()
,ElemCreate()
add buffer length parameter. If using legacy internal mode (GSLC_LOCAL_STR=1
) then simply pass a value of0
as it will be ignored. If using external storage (GSLC_LOCAL_STR=0
) then character buffer should be a static or global variable.
- Migration Notes (Developer APIs)
DrvLoadBmp()
replaced byDrvLoadImage()
DrvLoadImage()
,DrvSetBkgndImage()
,DrvSetElemImageNorm()
,DrvSetElemImageGlow()
,DrvDrawImage()
now usetsImgRef
Compound element structs (eg.XSelNum
) need to include text string storage to supportGSLC_LOCAL_STR=0
Centralized Configuration
- Exciting news: GUIslice will add support for Arduino very soon!
- Centralized configuration into
GUIslice_config.h
- Removed
InitEnv()
andDrvInitEnv()
- Environment setup migrated to user code (see
UserInitEnv()
in examples)
- Removed
- Font routines use
tsFont*
instead ofvoid*
- Added
DrvGetTxtSize()
- Added
- Reduced maximum ID range to 16-bit; user range now 0..16383
- Text justification code migrated to core
DrawElemByRef()
instead of driver - Migration Notes (from v0.7.2 #
578c460
)- Replace call to
InitEnv()
with user init (seeUserInitEnv()
in examples) - Add
GUIslice_config.h
, modify as needed for environment / display - Rename
gslc_Color
togslc_tsColor
,gslc_Pt
togslc_tsPt
andgslc_Rect
togslc_tsRect
- Remove viewport functions and viewport params in
Init()
call (see #c8c41a8
notes)
- Replace call to
Added driver support for SDL2.0!
- GUIslice with SDL2 can leverage hardware rendering (via OpenGL).
- "
src/GUIslice_drv_sdl.*
" supports both SDL1.2 and SDL2 via compiler flag ("DRV_TYPE_SDL1
" or "DRV_TYPE_SDL2
"). - Code for SDL1.2 typically stores
SDL_Surface
while code for SDL2.0 typically storesSDL_Texture
.
- "
- Driver-specific members moved into
gslc_tsDriver
struct (tsGui.pvDriver
) - tslib interaction (eg.
GetTsTouch
) moved to "src/GUIslice_drv_sdl.*
" - Migration Notes (from 0.7.1):
- Renamed "
src/GUIslice_drv_sdl1.*
" to "src/GUIslice_drv_sdl.*
" - Renamed compile flag
VT_WRK_EN
toDRV_SDL_FIX_START
- User code instantiates
gslc_tsDriver
and passes into new param ofInit()
- User code add #include "
GUIslice_drv.h
" - Makefile requires selecting appropriate driver (either uncomment in file or pass via command-line)
- Renamed "
- Other details
DrvDraw()
routines return bool instead of void- Add partial redraw flag (
bRedrawPartialEn
) - Add diagnostic frame rate reporting
- Renamed private surface members (eg.
pvSurfBkgnd
topvImgBknd
) and related functions (eg.DrvSurfaceDestruct
toDrvImageDestruct
). DrvLoadBmp()
returns void* instead of SDL_Surface*- Renamed "
tests/test-sdl.*
" to "tests/test-sdl1.*
" and added "tests/test-sdl2.*
" - Enhanced drawing emulation routines
- Add type
gslc_Pt
Using SDL2.0 on Raspberry Pi
- GUIslice has been tested on a Raspberry Pi 3 with both SDL1.2 and SDL2.0 without Xwindows
- SDL2.0 with OpenGL can take advantage of video hardware acceleration
- Displays such as PiTFT work from
fb1
. SDL2.0 using OpenGL will write tofb0
. An extra step needs to be taken to allow the hardware accelerated output onfb0
to be seen byfb1
.- NOTE: More details will follow on the ImpulseAdventure website
- Compile SDL2.0 from sources
- Enable
rpi-fbcp
to mirror/dev/fb0
to/dev/fb1
Minor cleanup
- Migration Notes (from v0.7)
- No changes to public APIs
- Internal Changes
- Change:
tsElem.nType
usesint
instead ofteElemType
.teElemType
enum split between core and extended file so that new types
can be defined inGUIslice_ex.h
and not require changes to
GUIslice.h
header. - Change:
teTouch
enumeration separates state and position
- Change:
Common Event Handler framework
- Now events (draw, tick, touch) are propagated down from GUI
through pages and element collections to individual element
callback functions. - Migration Notes (from v0.6.x):
- No changes to public API
- Internal changes:
- Add: common event callback function (
pfuncXEvent
) to GUI,
Page, Collect, Elem - Add: event handlers:
PageEvent()
,CollectEvent()
,ElemEvent()
- Add:
*SetEventFunc()
for Page, Collect, Elem - Add: structures for
tsEvent
,tsEventTouch
,teEventType
,
teEventSubType
- Add:
ElemOwnsCoord()
- Remove:
tsCollect.pElemParent
- Change: Renamed
NotifyElemTouch()
toElemSendEventTouch()
- Change:
teTouch
enumeration
- Add: common event callback function (
Enhancements
Enhancements
- Add: Configurability in
InitEnv()
call to specify frame
buffer and touch device. This facilitates support for
other display hardware. - Add:
ElemSetTxtMargin()
to define text margin - Add:
GetVer()
to return current library version - Migration Notes (from 0.6.1):
InitEnv()
: changed parameters to support configuration of
device paths from user code. tsGui* parameter is replaced by
framebuffer and touchscreen device path strings. Pass NULL if
not used (eg. no touch support).
Add more styling controls
- Add: MIT License
- Add: Method to copy element styling between elements (
ElemSetStyleFrom
) - Add: Config to enable frame (
ElemSetFrameEn
) - Add: Config for Frame and Text glow color (
ElemSetGlowCol
) - Fix: Fixed occasional button that retained glow status
- Modify: Revised color definitions (
GSLC_COL_*
) to offer more
shades and consistency - Migration Notes (from 0.6):
ElemSetCol()
: 4th parameter was occasionally used to define FrameGlow
for certain controls (such as XSlider), but not it is only used for
FillGlow- Color definitions (
GSLC_COL_*_LT
andGSLC_COL_*_DK
) are replaced
by aGSLC_COL_*_LT#
or_DK#
where # represents the level of shade