From 43200ab700129c037448446d61301bde824acbda Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Tue, 12 Aug 2025 16:36:41 +0800 Subject: [PATCH] minor changes --- LoRaWAN/App/lora_app.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 64bd339..44aacac 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -593,7 +593,9 @@ static void OnRxData(LmHandlerAppData_t *appData, LmHandlerRxParams_t *params) typedef struct service_period_per_day { - uint8_t enable; // enable this time slot or not + uint8_t enable_mask; // enable this time slot or not day of week, + // 0x1f= 0b0001 1111 ---> day1 to day5 of week + // 0x60= 0b0110 0000 ---> day6 5o day 7 of week uint8_t start_hour; // start hour 00--23 in 24hour uint8_t start_minute; // start minute 00--59 uint8_t end_hour; // end hour 00-23 in 24 hour @@ -619,7 +621,7 @@ static void STS_Check_Service_Period(void) for (uint8_t i=0; i<4; i++) { - if (rc_service_period[i].enable) + if (rc_service_period[i].enable_mask) { if ((time_now.tm_hour >= rc_service_period[i].start_hour) && (time_now.tm_hour < rc_service_period[i].end_hour)) {