avr/valsched: only repeat 0 values once.

This commit is contained in:
Martin Preuss
2026-08-11 23:46:40 +02:00
parent 1941b76aa7
commit 3018b014bb

View File

@@ -77,12 +77,18 @@ ValueScheduler_Every100ms:
inc r16
breq ValueScheduler_Every100ms_end ; timer on hold
std Y+VALSCHED_OFFS_TIMER, r16
; check first report time
cpi r16, VALSCHED_REPORTTIME1
breq ValueScheduler_Every100ms_setSendFlag
sbrs r17, VALSCHED_FLAGS_FIRSTLOOP_BIT
rjmp ValueScheduler_Every100ms_checkInterval ; jump if not first round
; check second report time
cpi r16, VALSCHED_REPORTTIME2
breq ValueScheduler_Every100ms_setSendFlag
; only check next report time for "1" values
sbrs r17, VALSCHED_FLAGS_VALUE_BIT
rjmp ValueScheduler_Every100ms_checkInterval ; jump if value is 0 (only repeat once for value 0)
; check third report time
cpi r16, VALSCHED_REPORTTIME3
breq ValueScheduler_Every100ms_setSendFlag
ValueScheduler_Every100ms_checkInterval: