avr/gui2: added screen saver app

screen saver can be turned off by:
- touching and releasing the display
- specific messages (e.g. motion detection msg from other nodes)
This commit is contained in:
Martin Preuss
2026-02-07 16:09:31 +01:00
parent 39d1060334
commit 28deb9c591
10 changed files with 738 additions and 25 deletions

View File

@@ -58,6 +58,8 @@
.equ C03_EEID_SENSOR_TEMP = 0x11
.equ C03_EEID_SENSOR_HUM = 0x12
.equ EEID_SCREENSAVER = 0x20
; ---------------------------------------------------------------------------

View File

@@ -50,10 +50,11 @@ appC03:
.dw 0 ; first child
.dw 0 ; target
.dw 0 ; selector (ony lower 8 bits used)
.dw appC03_signalmap*2 ; signal map
.dw appC03_signalmap*2 ; signal map
; GUIAPP
.dw appC03_ramdata ; SDRAM data
.dw winRoot*2 ; root widget
.dw appC03_ramdata ; SDRAM data
.dw winRoot*2 ; root widget
.dw winScreenSaver*2 ; screen saver
appC03_signalmap:
.db 0, OBJECT_SIGNAL_TIMER, LOW(GuiApp_OnTimer), HIGH(GuiApp_OnTimer)

View File

@@ -70,7 +70,7 @@ buttonEepromDumpReset_ramdata:
winEepromDump:
; OBJECT
.db 0x55, 0xaa ; magic
.dw 0 ; next
.dw winScreenSaver*2 ; next
.dw winRoot*2 ; parent
.dw winEepromDumpHeader*2 ; first child
.dw 0 ; target

View File

@@ -0,0 +1,55 @@
; ***************************************************************************
; copyright : (C) 2026 by Martin Preuss
; email : martin@libchipcard.de
;
; ***************************************************************************
; * This file is part of the project "AqHome". *
; * Please see toplevel file COPYING of that project for license details. *
; ***************************************************************************
#ifndef AQH_AVR_DEVICE_C03_WIN_SCREENSAVER_ASM
#define AQH_AVR_DEVICE_C03_WIN_SCREENSAVER_ASM
; ***************************************************************************
; data
.dseg
winScreenSaver_ramdata:
.byte WIDGET_SD_SIZE
; ***************************************************************************
; code
.cseg
winScreenSaver:
; OBJECT
.db 0x55, 0xaa ; magic
.dw 0 ; next
.dw winRoot*2 ; parent
.dw 0 ; first child
.dw 0 ; target
.dw 0 ; selector (ony lower 8 bits used)
.dw ScreenSaver_DefaultSignalmap*2 ; signal map
; WIDGET
.db (1<<WIDGET_OPTSLO_INPUT_BIT) | (1<<WIDGET_OPTSLO_TIMER_BIT) | (1<<WIDGET_OPTSLO_MSGRECV_BIT), 0 ; opts lo, hi
.dw 0 ; X
.dw 0 ; Y
.dw DISPLAY_WIDTH ; W
.dw DISPLAY_HEIGHT ; H
.dw DISPLAY_COLOR_LIGHTGREY ; front color
.dw DISPLAY_COLOR_BLACK ; back color
.dw STYLE_WIN_FONT*2 ; font
.dw winScreenSaver_ramdata ; ptr to SDRAM
#endif

View File

@@ -98,23 +98,26 @@
.equ VALUE_ID_DEBUG = 0x7f
.equ VALUE_ID_LEDSIMPLE_TIMING = 0x88
.equ VALUE_ID_BEEPERSIMPLE_TIMING = 0x89
.equ VALUE_ID_LEDSIMPLE_TIMING = 0x88
.equ VALUE_ID_BEEPERSIMPLE_TIMING = 0x89
.equ VALUE_ID_SENSOR_CO2_BASE = 0x90
.equ VALUE_ID_SENSOR_CO2_SOURCE = 0x90
.equ VALUE_ID_SENSOR_CO2_LIMWARN = 0x91
.equ VALUE_ID_SENSOR_CO2_LIMCRIT = 0x92
.equ VALUE_ID_SENSOR_CO2_BASE = 0x90
.equ VALUE_ID_SENSOR_CO2_SOURCE = 0x90
.equ VALUE_ID_SENSOR_CO2_LIMWARN = 0x91
.equ VALUE_ID_SENSOR_CO2_LIMCRIT = 0x92
.equ VALUE_ID_SENSOR_TEMP_BASE = 0x93
.equ VALUE_ID_SENSOR_TEMP_SOURCE = 0x93
.equ VALUE_ID_SENSOR_TEMP_LIMWARN = 0x94
.equ VALUE_ID_SENSOR_TEMP_LIMCRIT = 0x95
.equ VALUE_ID_SENSOR_TEMP_BASE = 0x93
.equ VALUE_ID_SENSOR_TEMP_SOURCE = 0x93
.equ VALUE_ID_SENSOR_TEMP_LIMWARN = 0x94
.equ VALUE_ID_SENSOR_TEMP_LIMCRIT = 0x95
.equ VALUE_ID_SENSOR_HUM_BASE = 0x96
.equ VALUE_ID_SENSOR_HUM_SOURCE = 0x96
.equ VALUE_ID_SENSOR_HUM_LIMWARN = 0x97
.equ VALUE_ID_SENSOR_HUM_LIMCRIT = 0x98
.equ VALUE_ID_SENSOR_HUM_BASE = 0x96
.equ VALUE_ID_SENSOR_HUM_SOURCE = 0x96
.equ VALUE_ID_SENSOR_HUM_LIMWARN = 0x97
.equ VALUE_ID_SENSOR_HUM_LIMCRIT = 0x98
.equ VALUE_ID_SCREENSAVER_SETSOURCE1 = 0x9a
.equ VALUE_ID_SCREENSAVER_SETSOURCE2 = 0x9b
@@ -257,6 +260,8 @@ test:
.include "devices/all/hw_m644p.asm"
.include "devices/all/includes.asm"
.include "devices/all/handlevaluemsg.asm"
.include "common/debug.asm"
;.include "modules/lcd2/font/font2.asm"
@@ -293,6 +298,7 @@ test:
.include "modules/lcd2/gui2/generic/imageview.asm"
.include "modules/lcd2/gui2/generic/valuelabel.asm"
.include "modules/lcd2/gui2/generic/guiapp.asm"
.include "modules/lcd2/gui2/generic/screensaver.asm"
.include "modules/lcd2/gui2/sensorwatch.asm"
.include "modules/lcd2/gui2/eepromdump.asm"
@@ -300,6 +306,7 @@ test:
.include "g_win_climate.asm"
.include "g_win_network.asm"
.include "g_win_eepromdump.asm"
.include "g_win_screensaver.asm"
.include "ressources.inc"