fan_control: fixed setting of default mode, moved FLAGBIT_UPDATED to TCA.
This commit is contained in:
@@ -31,8 +31,5 @@
|
||||
.equ APP_FANCONTROL_EE_SIZE = APP_FANCONTROL_EE_OFFS_BEGIN+2
|
||||
|
||||
|
||||
.equ APP_FANCONTROL_FLAGBIT_UPDATED = 0 ; value updated (move to TCA!)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ AppFanControl_Init:
|
||||
|
||||
; ldi r16, 2
|
||||
ldi r16, 1
|
||||
std Y+HTIM_EE_OFFS_MODE, r16
|
||||
std Y+HTIM_RAM_OFFS_MODE, r16
|
||||
|
||||
; setup from eeprom
|
||||
push yl
|
||||
@@ -91,10 +91,10 @@ AppFanControl_OnEveryTick:
|
||||
|
||||
; check update flag
|
||||
ldd r16, Y+HTIM_RAM_OFFS_FLAGS
|
||||
sbrs r16, APP_FANCONTROL_FLAGBIT_UPDATED
|
||||
sbrs r16, TCA_FLAGBIT_UPDATED
|
||||
rjmp AppFanControl_OnEveryTick_ret ; jump if clear (value unchanged)
|
||||
; value updated
|
||||
cbr r16, (1<<APP_FANCONTROL_FLAGBIT_UPDATED) ; clear update bit
|
||||
cbr r16, (1<<TCA_FLAGBIT_UPDATED) ; clear update bit
|
||||
std Y+HTIM_RAM_OFFS_FLAGS, r16
|
||||
rcall appFanControlWriteEeprom
|
||||
rcall appFanControlUpdate
|
||||
|
||||
Reference in New Issue
Block a user