From 221b3c264de63037dfc9470080c7ae95dfcb75d3 Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Mon, 3 Jun 2024 17:38:01 +0800 Subject: [PATCH] minor improve for heart-beat and sampling/wakeuptimer scanning --- LoRaWAN/App/lora_app.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 1aeb58c..41f4a1e 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -1736,7 +1736,11 @@ void USER_APP_AUTO_RESPONDER_Parse(char *tlv_buf, size_t tlv_buf_size) TxPeriodicity = periodicity_length*1000; //translate to 1000ms=1s HeartBeatPeriodicity = TxPeriodicity; - OnTxPeriodicityChanged(TxPeriodicity); + //OnTxPeriodicityChanged(TxPeriodicity); +#if defined(STS_O6)||defined(STS_O7) + OnYunhornSTSHeartBeatPeriodicityChanged(TxPeriodicity); +#endif + i = 0; outbuf[i++] = (uint8_t) tlv_buf[CFG_CMD1]; outbuf[i++] = (uint8_t) tlv_buf[CFG_CMD2]; @@ -1779,10 +1783,14 @@ void USER_APP_AUTO_RESPONDER_Parse(char *tlv_buf, size_t tlv_buf_size) SamplingPeriodicity = heart_beat_or_sampling_periodicity_length*1000; //translate to 1000ms=1s OnYunhornSTSSamplingPeriodicityChanged(SamplingPeriodicity); #endif -//#if defined(YUNHORN_STS_R0_ENABLED)||defined(YUNHORN_STS_R5_ENABLED) +#if defined(YUNHORN_STS_R0_ENABLED)||defined(YUNHORN_STS_R5_ENABLED) HeartBeatPeriodicity = heart_beat_or_sampling_periodicity_length*1000; //translate to 1000ms=1s OnYunhornSTSHeartBeatPeriodicityChanged(HeartBeatPeriodicity); -//#endif +#endif +#if defined(STS_O6)||defined(STS_O7) + SamplingPeriodicity = heart_beat_or_sampling_periodicity_length*1000; //translate to 1000ms=1s + OnYunhornSTSSamplingPeriodicityChanged(SamplingPeriodicity); +#endif i = 0; outbuf[i++] = (uint8_t) tlv_buf[CFG_CMD1]; outbuf[i++] = (uint8_t) tlv_buf[CFG_CMD2];