From f0e4ac55959d1ee31c6b23e81a818a49beb818fa Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 6 Feb 2023 21:11:24 +0100 Subject: [PATCH] Always use new shortened address assignment protocol if possible. --- avr/att84_temp1.asm | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/avr/att84_temp1.asm b/avr/att84_temp1.asm index f19a1cb..9e195fb 100644 --- a/avr/att84_temp1.asm +++ b/avr/att84_temp1.asm @@ -242,12 +242,10 @@ blinkPattern2: .db 10, 20, 0xff, 0xff ; 1 long blink, 2s pause, restart ; USED: depending on called routines onSystemStart: - + rcall Utils_SetupUid #ifdef MODULES_COM - rcall Utils_SetupUid -; brcc onSystemStart_l1 -onSystemStart_l1: + rcall CPRO_StartReclaimAddrProcedure #endif ret @@ -358,20 +356,15 @@ onEvery30s_l1: ; USED: depending on called routines onEveryMinute: - in r15, SREG ; debug - cli - push r15 - #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 - - ;ldi r16, 219 - ;rcall CPRO_EnqueuePing +onEveryMinute_l1: #endif - pop r15 - out SREG, r15 ret