avr: added widget SensorWatch
shows a pictogram for a sensor and changes background color according to values received from a given sensor.
This commit is contained in:
@@ -229,7 +229,30 @@ test:
|
||||
ldi zl, LOW(testApp_flashdata*2)
|
||||
ldi zh, HIGH(testApp_flashdata*2)
|
||||
bigcall GuiApp_Init
|
||||
|
||||
ldi zl, LOW(winSensorWatch1*2)
|
||||
ldi zh, HIGH(winSensorWatch1*2)
|
||||
; set source
|
||||
ldi r16, SENSORWATCH_SIGNAL_SETSOURCE
|
||||
clr r17
|
||||
ldi xl, 191 ; node address
|
||||
ldi xh, 10 ; value 0x0a (SGP30_CO2)
|
||||
bigcall OBJ_HandleSignal
|
||||
|
||||
; set warning limit
|
||||
ldi r16, SENSORWATCH_SIGNAL_SETLIMWARN
|
||||
clr r17
|
||||
ldi xl, LOW(800)
|
||||
ldi xh, HIGH(800)
|
||||
bigcall OBJ_HandleSignal
|
||||
|
||||
; set critical limit
|
||||
ldi r16, SENSORWATCH_SIGNAL_SETLIMCRIT
|
||||
clr r17
|
||||
ldi xl, LOW(2000)
|
||||
ldi xh, HIGH(2000)
|
||||
bigcall OBJ_HandleSignal
|
||||
|
||||
ret
|
||||
|
||||
|
||||
@@ -266,6 +289,7 @@ test:
|
||||
.include "modules/lcd2/gui2/widget.asm"
|
||||
.include "modules/lcd2/gui2/label.asm"
|
||||
.include "modules/lcd2/gui2/imageview.asm"
|
||||
.include "modules/lcd2/gui2/sensorwatch.asm"
|
||||
.include "modules/lcd2/gui2/guiapp.asm"
|
||||
|
||||
.include "testwin.asm"
|
||||
|
||||
Reference in New Issue
Block a user