c03: use complete SensorWatch for CO2.

This commit is contained in:
Martin Preuss
2026-01-18 14:27:51 +01:00
parent 46afcb3ed1
commit 34176ea2ed
2 changed files with 33 additions and 1 deletions

View File

@@ -281,6 +281,7 @@ test:
;.include "common/list_t.asm"
;.include "common/tree_t.asm"
.include "common/divide.asm"
.include "common/itoa.asm"
.include "common/ressource.asm"
.include "style.asm"
@@ -290,6 +291,7 @@ test:
.include "modules/lcd2/gui2/label.asm"
.include "modules/lcd2/gui2/imageview.asm"
.include "modules/lcd2/gui2/sensorwatch.asm"
.include "modules/lcd2/gui2/valuelabel.asm"
.include "modules/lcd2/gui2/guiapp.asm"
.include "testwin.asm"

View File

@@ -46,6 +46,8 @@ winSensorWatch1Title_ramdata:
winSensorWatch1Image_ramdata:
.byte IMGVIEW_SD_SIZE
winSensorWatch1Value_ramdata:
.byte VLABEL_SD_SIZE
@@ -255,7 +257,7 @@ winSensorWatch1Title_signalmap:
winSensorWatch1Image:
; OBJECT
.db 0x55, 0xaa ; magic
.dw 0 ; next
.dw winSensorWatch1Value*2 ; next
.dw winSensorWatch1*2 ; parent
.dw 0 ; first child
.dw 0 ; target
@@ -281,6 +283,34 @@ winSensorWatch1Image_signalmap:
.db 0, 0, 0, 0 ; end of table
winSensorWatch1Value:
; OBJECT
.db 0x55, 0xaa ; magic
.dw 0 ; next
.dw winSensorWatch1*2 ; parent
.dw 0 ; first child
.dw 0 ; target
.dw 0 ; selector (ony lower 8 bits used)
.dw winSensorWatch1Value_signalmap*2 ; signal map
; WIDGET
.db 0, 0 ; opts lo, hi
.dw 2 ; X
.dw STYLE_WIN_FONT_HEIGHT+2+96+2 ; Y
.dw 96 ; W
.dw STYLE_WIN_FONT_HEIGHT+2 ; H
.dw STYLE_WIN_FOREGROUND ; front color
.dw STYLE_WIN_BACKGROUND ; back color
.dw STYLE_WIN_FONT*2 ; font
.dw winSensorWatch1Value_ramdata ; ptr to SDRAM
; VALUELABEL
.db 0, 0 ; num of post-komma digits
winSensorWatch1Value_signalmap:
.db 0, OBJECT_SIGNAL_CREATE, LOW(Widget_OnCreate), HIGH(Widget_OnCreate)
.db 0, WIDGET_SIGNAL_DRAW, LOW(ValueLabel_OnDraw), HIGH(ValueLabel_OnDraw)
.db 0, VLABEL_SIGNAL_SETVALUE, LOW(ValueLabel_OnSetValue), HIGH(ValueLabel_OnSetValue)
.db 0, 0, 0, 0 ; end of table