diff --git a/Core/Inc/yunhorn_sts_prd_conf.h b/Core/Inc/yunhorn_sts_prd_conf.h index 6638602..99b2b26 100644 --- a/Core/Inc/yunhorn_sts_prd_conf.h +++ b/Core/Inc/yunhorn_sts_prd_conf.h @@ -213,7 +213,7 @@ #ifdef YUNHORN_STS_M7_ENABLED #define MajorVer 22U #define MinorVer 11U -#define SubMinorVer 02U +#define SubMinorVer 03U #define FirmwareVersion 3U #define YUNHORN_STS_M7_NVM_CFG_SIZE 3U #define YUNHORN_STS_M7_CFG_CMD_SIZE 9U diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index cd356a1..c21c16c 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -774,6 +774,9 @@ void USER_APP_AUTO_RESPONDER_Parse(char *tlv_buf, size_t tlv_buf_size) inact_threshold += (tlv_buf[i++]-0x30); // "P 1 0 0 8 0 4" -> 0*10 + 4 inact_duration = (uint8_t) (tlv_buf[i++]-0x30)*10; // "P 1 0 0 8 0 4 0 3" -> 0*10 inact_duration += (uint8_t) (tlv_buf[i++]-0x30); // "P 1 0 0 8 0 4 0 3" -> 0*10+3 + + if (act_threshold <= inact_threshold) + act_threshold += 2; } STS_MOTION_SENSOR_ACT_INACT_DURATION_Init();