n30: removed unneeded code, re-enable stats app.

This commit is contained in:
Martin Preuss
2026-04-26 12:46:08 +02:00
parent 0db8eda08b
commit cacfdaa6e7

View File

@@ -62,7 +62,7 @@
#define APPS_NETWORK #define APPS_NETWORK
#define APPS_REPORTSENSORS #define APPS_REPORTSENSORS
;#define APPS_STATS #define APPS_STATS
#define APPS_MA_LIGHT #define APPS_MA_LIGHT
@@ -70,17 +70,9 @@
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
; defines for modules ; defines for modules
;.equ VALUE_ID_SI7021_TEMP = 0x01
;.equ VALUE_ID_SI7021_HUM = 0x02
;.equ VALUE_ID_ADC = 0x03
;.equ VALUE_ID_REED1 = 0x04
;.equ VALUE_ID_REED2 = 0x05
.equ VALUE_ID_DS18B20_TEMP = 0x06 .equ VALUE_ID_DS18B20_TEMP = 0x06
.equ VALUE_ID_MAL_STATE = 0x07 .equ VALUE_ID_MAL_STATE = 0x07
;.equ VALUE_ID_REED_CONF = 0x81
.equ VALUE_ID_LED_STATE = 0x81 .equ VALUE_ID_LED_STATE = 0x81
.equ VALUE_ID_LED_NUMLEDS = 0x82 .equ VALUE_ID_LED_NUMLEDS = 0x82
.equ VALUE_ID_LED_RGBW_VALUE = 0x83 .equ VALUE_ID_LED_RGBW_VALUE = 0x83
@@ -93,7 +85,6 @@
.equ VALUE_ID_LED_MODE = 0x8b .equ VALUE_ID_LED_MODE = 0x8b
.equ VALUE_ID_LED_TYPE = 0x8c .equ VALUE_ID_LED_TYPE = 0x8c
.equ VALUE_ID_LEDSIMPLE_TIMING = 0x88
@@ -147,8 +138,6 @@ firmwareStart:
; @routine onSystemStart ; @routine onSystemStart
onSystemStart: onSystemStart:
ldi r16, DEVICE_SEND_MINUTES
sts minuteCounter, r16
ret ret
; @end ; @end
@@ -174,43 +163,10 @@ onMessageReceived:
onEvery100ms: onEvery100ms:
onEveryHour: onEveryHour:
onEveryDay: onEveryDay:
ret
; @end
onEveryMinute: onEveryMinute:
lds r16, minuteCounter
dec r16
sts minuteCounter, r16
brne onEveryMinute_end
ldi r16, DEVICE_SEND_MINUTES
sts minuteCounter, r16
ldi yl, LOW(netInterfaceData)
ldi yh, HIGH(netInterfaceData)
rcall sendDevice
#ifdef APP_STATS_NETDEV2
ldi yl, LOW(netInterfaceData2)
ldi yh, HIGH(netInterfaceData2)
rcall sendDevice
#endif
onEveryMinute_end:
ret
; @end
onEverySecond: onEverySecond:
ret ret
#if 0 ; @end
; debug
ldi r19, 0x00 ; G
ldi r18, 0xff ; R
ldi r20, 0x55 ; B
ldi r21, 0xaa ; W
rcall SK6812_SetAllColor ; r23 (r16, r17)
#endif
ret
@@ -225,36 +181,12 @@ onEveryLoop:
; ---------------------------------------------------------------------------
; @routine sendDevice
; @param Y network interface to work with
; @clobbers R16, X (R17, R18, R19, R20, R21, Z)
sendDevice:
bigcall NET_Buffer_Alloc ; (R16, R17, X)
brcc sendDevice_end
push r16
adiw xh:xl, 1
bigcall NETMSG_Device_Write ; (R16, R17, R18, R19, R20, R21, Z)
sbiw xh:xl, 1
pop r16
bigcall NET_Interface_AddOrReleaseOutMsg ; (R16, R17, R18, X)
sendDevice_end:
ret
; @end
; *************************************************************************** ; ***************************************************************************
; includes ; includes
.include "devices/all/hw_tn84.asm" .include "devices/all/hw_tn84.asm"
.include "devices/all/includes.asm" .include "devices/all/includes.asm"
;.include "common/debug.asm" ;.include "common/debug.asm"
.include "modules/network/msg/device-w.asm"
@@ -272,7 +204,3 @@ deviceCodeEnd:
.dseg
minuteCounter: .byte 1