c03: implemented setdata message handling for SensorWatch
storing/restoring data from EEPROM doesn't work, yet.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
C01
|
||||
C03
|
||||
===
|
||||
|
||||
- Role: Controller with Display
|
||||
@@ -8,3 +8,11 @@ C01
|
||||
- Periphery:
|
||||
- Display with SPI
|
||||
|
||||
|
||||
|
||||
|
||||
SetLimits:
|
||||
aqhome-tool setdata -N nodes/xxxxxxxx/CO2_LIMIT_CRIT -v "LOWER:UPPER"
|
||||
aqhome-tool setdata -N nodes/xxxxxxxx/CO2_LIMIT_WARN -v "LOWER:UPPER"
|
||||
|
||||
|
||||
|
||||
@@ -66,6 +66,9 @@ winClimateSensor3Value_ramdata:
|
||||
buttonClimateNetwork_ramdata:
|
||||
.byte IMGVIEW_SD_SIZE
|
||||
|
||||
debugValue1_ramdata:
|
||||
.byte VLABEL_SD_SIZE
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
@@ -158,25 +161,25 @@ winClimate_signalmap:
|
||||
|
||||
winClimateSensor1:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw winClimateSensor2*2 ; next
|
||||
.dw winClimateBody*2 ; parent
|
||||
.dw winClimateSensor1Title*2 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw SensorWatch_DefaultSignalmap*2 ; signal map
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw winClimateSensor2*2 ; next
|
||||
.dw winClimateBody*2 ; parent
|
||||
.dw winClimateSensor1Title*2 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw SensorWatch_DefaultSignalmap*2 ; signal map
|
||||
; WIDGET
|
||||
.db (1<<WIDGET_OPTSLO_MSGRECV_BIT), 0 ; opts lo, hi
|
||||
.dw 4 ; X
|
||||
.dw 4 ; Y
|
||||
.dw 100 ; W (image=96, 2 px borders)
|
||||
.dw 100 ; H
|
||||
.dw STYLE_WIN_FOREGROUND ; front color
|
||||
.dw STYLE_WIN_BACKGROUND ; back color
|
||||
.dw STYLE_WIN_FONT*2 ; font
|
||||
.dw winClimateSensor1_ramdata ; ptr to SDRAM
|
||||
.db (1<<WIDGET_OPTSLO_MSGRECV_BIT), 0 ; opts lo, hi
|
||||
.dw 4 ; X
|
||||
.dw 4 ; Y
|
||||
.dw 100 ; W (image=96, 2 px borders)
|
||||
.dw 100 ; H
|
||||
.dw STYLE_WIN_FOREGROUND ; front color
|
||||
.dw STYLE_WIN_BACKGROUND ; back color
|
||||
.dw STYLE_WIN_FONT*2 ; font
|
||||
.dw winClimateSensor1_ramdata ; ptr to SDRAM
|
||||
; SENSORWATCH
|
||||
.db 0, 0 ; baseValueId, eepromId
|
||||
.db VALUE_ID_SENSOR_CO2_BASE, C03_EEID_SENSOR_CO2 ; baseValueId, eepromId
|
||||
|
||||
|
||||
winClimateSensor1Title:
|
||||
@@ -256,25 +259,25 @@ winClimate_signalmap:
|
||||
|
||||
winClimateSensor2:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw winClimateSensor3*2 ; next
|
||||
.dw winClimateBody*2 ; parent
|
||||
.dw winClimateSensor2Title*2 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw SensorWatch_DefaultSignalmap*2 ; signal map
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw winClimateSensor3*2 ; next
|
||||
.dw winClimateBody*2 ; parent
|
||||
.dw winClimateSensor2Title*2 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw SensorWatch_DefaultSignalmap*2 ; signal map
|
||||
; WIDGET
|
||||
.db (1<<WIDGET_OPTSLO_MSGRECV_BIT), 0 ; opts lo, hi
|
||||
.dw 108 ; X
|
||||
.dw 4 ; Y
|
||||
.dw 100 ; W (image=96, 2 px borders)
|
||||
.dw 100 ; H
|
||||
.dw STYLE_WIN_FOREGROUND ; front color
|
||||
.dw STYLE_WIN_BACKGROUND ; back color
|
||||
.dw STYLE_WIN_FONT*2 ; font
|
||||
.dw winClimateSensor2_ramdata ; ptr to SDRAM
|
||||
.db (1<<WIDGET_OPTSLO_MSGRECV_BIT), 0 ; opts lo, hi
|
||||
.dw 108 ; X
|
||||
.dw 4 ; Y
|
||||
.dw 100 ; W (image=96, 2 px borders)
|
||||
.dw 100 ; H
|
||||
.dw STYLE_WIN_FOREGROUND ; front color
|
||||
.dw STYLE_WIN_BACKGROUND ; back color
|
||||
.dw STYLE_WIN_FONT*2 ; font
|
||||
.dw winClimateSensor2_ramdata ; ptr to SDRAM
|
||||
; SENSORWATCH
|
||||
.db 0, 0 ; baseValueId, eepromId
|
||||
.db VALUE_ID_SENSOR_TEMP_BASE, C03_EEID_SENSOR_TEMP ; baseValueId, eepromId
|
||||
|
||||
|
||||
|
||||
@@ -355,25 +358,25 @@ winClimate_signalmap:
|
||||
|
||||
winClimateSensor3:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw buttonClimateNetwork*2 ; next
|
||||
.dw winClimateBody*2 ; parent
|
||||
.dw winClimateSensor3Title*2 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw SensorWatch_DefaultSignalmap*2 ; signal map
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw buttonClimateNetwork*2 ; next
|
||||
.dw winClimateBody*2 ; parent
|
||||
.dw winClimateSensor3Title*2 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw SensorWatch_DefaultSignalmap*2 ; signal map
|
||||
; WIDGET
|
||||
.db (1<<WIDGET_OPTSLO_MSGRECV_BIT), 0 ; opts lo, hi
|
||||
.dw 212 ; X
|
||||
.dw 4 ; Y
|
||||
.dw 100 ; W (image=96, 2 px borders)
|
||||
.dw 100 ; H
|
||||
.dw STYLE_WIN_FOREGROUND ; front color
|
||||
.dw STYLE_WIN_BACKGROUND ; back color
|
||||
.dw STYLE_WIN_FONT*2 ; font
|
||||
.dw winClimateSensor3_ramdata ; ptr to SDRAM
|
||||
.db (1<<WIDGET_OPTSLO_MSGRECV_BIT), 0 ; opts lo, hi
|
||||
.dw 212 ; X
|
||||
.dw 4 ; Y
|
||||
.dw 100 ; W (image=96, 2 px borders)
|
||||
.dw 100 ; H
|
||||
.dw STYLE_WIN_FOREGROUND ; front color
|
||||
.dw STYLE_WIN_BACKGROUND ; back color
|
||||
.dw STYLE_WIN_FONT*2 ; font
|
||||
.dw winClimateSensor3_ramdata ; ptr to SDRAM
|
||||
; SENSORWATCH
|
||||
.db 0, 0 ; baseValueId, eepromId
|
||||
.db VALUE_ID_SENSOR_HUM_BASE, C03_EEID_SENSOR_HUM ; baseValueId, eepromId
|
||||
|
||||
|
||||
|
||||
@@ -449,12 +452,13 @@ winClimate_signalmap:
|
||||
.dw winClimateSensor3Value_ramdata ; ptr to SDRAM
|
||||
; VALUELABEL
|
||||
.db 0, 0 ; num of post-komma digits
|
||||
|
||||
|
||||
|
||||
|
||||
buttonClimateNetwork:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
; .dw debugValue1*2 ; next
|
||||
.dw 0 ; next
|
||||
.dw winClimateBody*2 ; parent
|
||||
.dw 0 ; first child
|
||||
@@ -482,4 +486,29 @@ winClimate_signalmap:
|
||||
.db 0, 0, 0, 0 ; end of table
|
||||
|
||||
|
||||
#if 0
|
||||
debugValue1:
|
||||
; OBJECT
|
||||
.db 0x55, 0xaa ; magic
|
||||
.dw 0 ; next
|
||||
.dw winClimateBody*2 ; parent
|
||||
.dw 0 ; first child
|
||||
.dw 0 ; target
|
||||
.dw 0 ; selector (ony lower 8 bits used)
|
||||
.dw ValueLabel_DefaultSignalmap*2 ; signal map
|
||||
; WIDGET
|
||||
.db 0, (1<<WIDGET_OPTSHI_HALIGNCENTER_BIT) ; opts lo, hi
|
||||
.dw 2 ; X
|
||||
.dw (3*STYLE_WIN_FONT_HEIGHT)+2+96+2 ; Y
|
||||
.dw 96 ; W
|
||||
.dw STYLE_WIN_FONT_HEIGHT+4 ; H
|
||||
.dw STYLE_WIN_FOREGROUND ; front color
|
||||
.dw STYLE_WIN_BACKGROUND ; back color
|
||||
.dw STYLE_WIN_FONT*2 ; font
|
||||
.dw debugValue1_ramdata ; ptr to SDRAM
|
||||
; VALUELABEL
|
||||
.db 0, 0 ; num of post-komma digits
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -99,7 +99,20 @@
|
||||
|
||||
.equ VALUE_ID_LEDSIMPLE_TIMING = 0x88
|
||||
|
||||
.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_HUM_BASE = 0x96
|
||||
.equ VALUE_ID_SENSOR_HUM_SOURCE = 0x96
|
||||
.equ VALUE_ID_SENSOR_HUM_LIMWARN = 0x97
|
||||
.equ VALUE_ID_SENSOR_HUM_LIMCRIT = 0x98
|
||||
|
||||
|
||||
|
||||
@@ -301,6 +314,10 @@ test:
|
||||
;.include "modules/lcd2/ili9341/font12x20_1.asm"
|
||||
;.include "common/list_t.asm"
|
||||
;.include "common/tree_t.asm"
|
||||
|
||||
.include "common/eeprom_tlv.asm"
|
||||
;.include "common/eeprom-r.asm"
|
||||
|
||||
.include "common/divide.asm"
|
||||
.include "common/itoa.asm"
|
||||
.include "common/ressource.asm"
|
||||
|
||||
Reference in New Issue
Block a user