sensorwatch: introduce upper and lower limits.

This commit is contained in:
Martin Preuss
2026-01-21 00:56:49 +01:00
parent 864f815d91
commit dbe42c5bcb
4 changed files with 177 additions and 71 deletions

View File

@@ -174,7 +174,9 @@ winClimate_signalmap:
.dw STYLE_WIN_FOREGROUND ; front color
.dw STYLE_WIN_BACKGROUND ; back color
.dw STYLE_WIN_FONT*2 ; font
.dw winClimateSensor1_ramdata ; ptr to SDRAM
.dw winClimateSensor1_ramdata ; ptr to SDRAM
; SENSORWATCH
.db 0, 0 ; baseValueId, eepromId
winClimateSensor1Title:
@@ -271,6 +273,8 @@ winClimate_signalmap:
.dw STYLE_WIN_BACKGROUND ; back color
.dw STYLE_WIN_FONT*2 ; font
.dw winClimateSensor2_ramdata ; ptr to SDRAM
; SENSORWATCH
.db 0, 0 ; baseValueId, eepromId
@@ -367,7 +371,9 @@ winClimate_signalmap:
.dw STYLE_WIN_FOREGROUND ; front color
.dw STYLE_WIN_BACKGROUND ; back color
.dw STYLE_WIN_FONT*2 ; font
.dw winClimateSensor3_ramdata ; ptr to SDRAM
.dw winClimateSensor3_ramdata ; ptr to SDRAM
; SENSORWATCH
.db 0, 0 ; baseValueId, eepromId

View File

@@ -235,19 +235,19 @@ test:
; set source
ldi r16, SENSORWATCH_SIGNAL_SETSOURCE
clr r17
ldi xl, 191 ; node address
ldi xl, 98 ; node address
ldi xh, 10 ; value 0x0a (SGP30_CO2)
bigcall OBJ_HandleSignal
; set warning limit
ldi r16, SENSORWATCH_SIGNAL_SETLIMWARN
ldi r16, SENSORWATCH_SIGNAL_SETUPPERLIMWARN
clr r17
ldi xl, LOW(800)
ldi xh, HIGH(800)
bigcall OBJ_HandleSignal
; set critical limit
ldi r16, SENSORWATCH_SIGNAL_SETLIMCRIT
ldi r16, SENSORWATCH_SIGNAL_SETUPPERLIMCRIT
clr r17
ldi xl, LOW(2000)
ldi xh, HIGH(2000)