avr: completed SensorWatch (now also prints value)
This commit is contained in:
@@ -204,6 +204,7 @@ SensorWatch_OnMsgReceived_report:
|
||||
std Y+SENSORWATCH_SD_OFFS_VALUE_HI, r19
|
||||
; setup background color
|
||||
rcall sensorWatchSetColor ; (any, !Y, !Z)
|
||||
rcall sensorWatchSetValueLabel ; (any, !Y, !Z)
|
||||
SensorWatch_OnMsgReceived_ret:
|
||||
sec
|
||||
ret
|
||||
@@ -240,31 +241,31 @@ SensorWatch_GetImageView_ret:
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine SensorWatch_GetDataLabel @global
|
||||
; @routine SensorWatch_GetValueLabel @global
|
||||
;
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @return CFLAG set if widget found, cleared otherwise
|
||||
; @return R19:R18 byte address pointer to image view (for LPM!)
|
||||
; @clobbers none
|
||||
|
||||
SensorWatch_GetDataLabel:
|
||||
SensorWatch_GetValueLabel:
|
||||
bigcall OBJ_IsObject ; (none)
|
||||
brcc SensorWatch_GetDataLabel_ret
|
||||
brcc SensorWatch_GetValueLabel_ret
|
||||
push zl
|
||||
push zh
|
||||
bigcall OBJ_GetFirstChild ; (none)
|
||||
brcc SensorWatch_GetDataLabel_done
|
||||
brcc SensorWatch_GetValueLabel_done
|
||||
mov zl, r18
|
||||
mov zh, r19
|
||||
bigcall OBJ_GetNext ; 2nd child
|
||||
brcc SensorWatch_GetDataLabel_done
|
||||
brcc SensorWatch_GetValueLabel_done
|
||||
mov zl, r18
|
||||
mov zh, r19
|
||||
bigcall OBJ_GetNext ; 3nd child
|
||||
SensorWatch_GetDataLabel_done:
|
||||
SensorWatch_GetValueLabel_done:
|
||||
pop zh
|
||||
pop zl
|
||||
SensorWatch_GetDataLabel_ret:
|
||||
SensorWatch_GetValueLabel_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
@@ -333,6 +334,33 @@ sensorWatchSetColor_ret:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine sensorWatchSetValueLabel
|
||||
;
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param Y pointer to SDRAM data
|
||||
; @clobbers any, !Y, !Z
|
||||
|
||||
sensorWatchSetValueLabel:
|
||||
rcall SensorWatch_GetValueLabel ; (none)
|
||||
brcc sensorWatchSetValueLabel_ret
|
||||
push zl
|
||||
push zh
|
||||
mov zl, r18
|
||||
mov zh, r19
|
||||
ldd xl, Y+SENSORWATCH_SD_OFFS_VALUE_LO
|
||||
ldd xh, Y+SENSORWATCH_SD_OFFS_VALUE_HI
|
||||
ldi r16, VLABEL_SIGNAL_SETVALUE
|
||||
clr r17
|
||||
bigcall OBJ_HandleSignal ; (any, !X, !Y, !Z)
|
||||
pop zh
|
||||
pop zl
|
||||
sensorWatchSetValueLabel_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user