From 440fd9cc3391f90aeceaaa4e60de697f11254427 Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Mon, 3 Jul 2023 13:27:11 +0800 Subject: [PATCH] remove useless sts command auto response process --- LoRaWAN/App/lora_app.c | 63 ++++-------------------------------------- 1 file changed, 6 insertions(+), 57 deletions(-) diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index bdf49d3..8c6b444 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -1902,62 +1902,6 @@ void STS_SENSOR_Upload_Message(uint8_t appDataPort, uint8_t appBufferSize, char } -void STS_SENSOR_Auto_Responder_Process(uint8_t tlv_ver,uint8_t tlv_type, uint8_t tlv_length, uint8_t *tlv_content) -{ - uint8_t sensor_mems_type=(tlv_content[0]-0x30); //sensor_mems_type defined in sts_sensors.h - -#ifdef YUNHORN_STS_M7_ENABLED - uint8_t fm_version = FirmwareVersion; //MajorVer+MinorVer+SubMinorVer; - -#endif - - switch (sensor_mems_type) - { -#ifdef YUNHORN_STS_M7_ENABLED - case sts_mtmcode2: - //TODO - break; -#endif - -//#ifdef YUNHORN_STS_R0_ENABLED -// case STS_CTRL_CMD_MEMS_TUNE_TOF_VL53L0X: - -// break; -//#endif -#ifdef YUNHORN_STS_P1_ENABLED - case STS_CTRL_CMD_MEMS_TUNE_FMCW_TI68X: - - break; -#endif -#ifdef YUNHORN_STS_OO_ENABLED - case STS_CTRL_CMD_MEMS_TUNE_PCR_A12X: - - break; - - case STS_CTRL_CMD_PRESENCE_SETTING: - - break; -#endif -#ifdef YUNHORN_STS_M3_ENABLED - case STS_CTRL_CMD_MEMS_TUNE_DIGITAL_RELAY: - - break; -#endif -#ifdef YUNHORN_STS_M5_ENABLED - case STS_CTRL_CMD_MEMS_TUNE_FAN_CONTROL: - - break; -#endif - default: - - break; - - } -} - - - - void OnStoreSTSCFGContextRequest(void) { /* USER CODE BEGIN OnStoreContextRequest_1 */ @@ -2140,6 +2084,10 @@ void STS_SENSOR_Distance_Test_Process(void) APP_LOG(TS_OFF, VLEVEL_M, "\r\nSensor Function Test: Distance Measured =%u mm\r\n", (int)sts_distance_rss_distance); #endif + +#ifdef YUNHORN_STS_R0_ENABLED + MX_TOF_Process(); +#endif } void STS_SENSOR_Function_Test_Process(void) @@ -2177,7 +2125,8 @@ void STS_SENSOR_Function_Test_Process(void) tstbuf[i++] = (uint8_t) ((((uint16_t)sts_distance_rss_distance)/100)%10+0x30)&0xff; tstbuf[i++] = (uint8_t) ((((uint16_t)sts_distance_rss_distance)/10)%10+0x30)&0xff; tstbuf[i++] = (uint8_t) (((uint16_t)sts_distance_rss_distance)%10+0x30)&0xff; - #endif +#endif + #ifdef YUNHORN_STS_R0_ENABLED tstbuf[i++] = (uint8_t)2; //length of following data MX_TOF_Process();