Always use new shortened address assignment protocol if possible.

This commit is contained in:
Martin Preuss
2023-02-06 21:11:24 +01:00
parent b3b5aaba43
commit 2ce2aa03c8

View File

@@ -242,12 +242,10 @@ blinkPattern2: .db 10, 20, 0xff, 0xff ; 1 long blink, 2s pause, restart
; USED: depending on called routines ; USED: depending on called routines
onSystemStart: onSystemStart:
rcall Utils_SetupUid
#ifdef MODULES_COM #ifdef MODULES_COM
rcall Utils_SetupUid rcall CPRO_StartReclaimAddrProcedure
; brcc onSystemStart_l1
onSystemStart_l1:
#endif #endif
ret ret
@@ -358,20 +356,15 @@ onEvery30s_l1:
; USED: depending on called routines ; USED: depending on called routines
onEveryMinute: onEveryMinute:
in r15, SREG ; debug
cli
push r15
#ifdef MODULES_COM #ifdef MODULES_COM
ldi r16, 219 lds r16, comAddress ; do we have an address assigned?
tst r16
breq onEveryMinute_l1 ; no, do nothing
ldi r16, 0xff ; send stats to everybody
rcall CPRO_EnqueueComSendStats rcall CPRO_EnqueueComSendStats
onEveryMinute_l1:
;ldi r16, 219
;rcall CPRO_EnqueuePing
#endif #endif
pop r15
out SREG, r15
ret ret