revised for mtm-2 code to 39, disable log

This commit is contained in:
Yunhorn 2023-11-10 12:57:47 +08:00
parent fe711a3ff8
commit 1266be1ae3
3 changed files with 7 additions and 6 deletions

View File

@ -234,7 +234,7 @@
#define MajorVer 23U #define MajorVer 23U
#define MinorVer 11U #define MinorVer 11U
#define SubMinorVer 02U #define SubMinorVer 10U
#define FirmwareVersion 3U #define FirmwareVersion 3U
#define YUNHORN_STS_MAX_NVM_CFG_SIZE 64U #define YUNHORN_STS_MAX_NVM_CFG_SIZE 64U
#define YUNHORN_STS_AC_CODE_SIZE 20U #define YUNHORN_STS_AC_CODE_SIZE 20U
@ -251,7 +251,7 @@
#ifdef YUNHORN_STS_R1_ENABLED #ifdef YUNHORN_STS_R1_ENABLED
#define sts_mtmcode1 0U #define sts_mtmcode1 0U
#define sts_mtmcode2 57U #define sts_mtmcode2 39U
#define sts_hardware_ver 1U #define sts_hardware_ver 1U
#define sts_version 1U #define sts_version 1U
#define sts_senddataport (YUNHORN_STS_R1_LORA_APP_DATA_PORT) #define sts_senddataport (YUNHORN_STS_R1_LORA_APP_DATA_PORT)

View File

@ -816,7 +816,7 @@ static void SendTxData(void)
#endif #endif
//r0_data.battery_Pct = batteryLevel; //(uint8_t)(99*batteryLevel/254); //r0_data.battery_Pct = batteryLevel; //(uint8_t)(99*batteryLevel/254);
EnvSensors_Read(&sensor_data); //EnvSensors_Read(&sensor_data);
// APP_LOG(TS_ON, VLEVEL_M, "\r\nVDDA: %d\r\n", batteryLevel); // APP_LOG(TS_ON, VLEVEL_M, "\r\nVDDA: %d\r\n", batteryLevel);
// APP_LOG(TS_ON, VLEVEL_M, "\r\ntemp: %d\r\n", (int16_t)(sensor_data.temperature)); // APP_LOG(TS_ON, VLEVEL_M, "\r\ntemp: %d\r\n", (int16_t)(sensor_data.temperature));
@ -838,6 +838,7 @@ static void SendTxData(void)
if (heart_beat_timer != 0U) if (heart_beat_timer != 0U)
{ {
heart_beat_timer = 0U; heart_beat_timer = 0U;
AppData.Buffer[0] = AppLedStateOn|0X80;
AppData.Port = LORAWAN_USER_HTBT_PORT; //LORAWAN_USER_APP_PORT+1; AppData.Port = LORAWAN_USER_HTBT_PORT; //LORAWAN_USER_APP_PORT+1;
#ifdef ROCTEC_R5 #ifdef ROCTEC_R5
AppData.Buffer[i++] = AppLedStateOn; AppData.Buffer[i++] = AppLedStateOn;
@ -1005,7 +1006,7 @@ static void OnJoinRequest(LmHandlerJoinParams_t *joinParams)
OnYunhornSTSHeartBeatPeriodicityChanged(HeartBeatPeriodicity); OnYunhornSTSHeartBeatPeriodicityChanged(HeartBeatPeriodicity);
OnTxPeriodicityChanged(TxPeriodicity); OnTxPeriodicityChanged(TxPeriodicity);
APP_LOG(TS_OFF, VLEVEL_H,"\r\n STS_LoRa_WAN_Joined = %s \r\n", (STS_LoRa_WAN_Joined == 1)?"ABP":"OTAA"); APP_LOG(TS_OFF, VLEVEL_L,"\r\n STS_LoRa_WAN_Joined = %s \r\n", (STS_LoRa_WAN_Joined == 1)?"ABP":"OTAA");
} }
else else
{ {

View File

@ -411,14 +411,14 @@ void STS_TOF_VL53L0X_Range_Process(void)
} }
HAL_Delay(1); HAL_Delay(1);
} while ((RangingMeasurementData.RangeStatus != 0)&&(rep <10)); } while ((RangingMeasurementData.RangeStatus != 0)&&(rep <10));
sts_tof_distance_data[i] = (RangingMeasurementData.RangeStatus!=0)?STS_MAX_L0_RANGE:sts_tof_distance_data[i]; sts_tof_distance_data[i] = (RangingMeasurementData.RangeStatus!=0)?STS_MAX_L0_RANGE:VL53L0XDevs[i].LeakyRange;
} }
HAL_Delay(5); HAL_Delay(5);
} // for i < MAX_TOF_COUNT } // for i < MAX_TOF_COUNT
if (sensor_data_ready != 0) { if (sensor_data_ready != 0) {
APP_LOG(TS_OFF, VLEVEL_H, "\r\n## Measured Range: \r\nTOF #0 = %4u mm, \r\nTOF #1 = %4u mm, \r\nTOF #2 = %4u mm\r\n", APP_LOG(TS_OFF, VLEVEL_L, "\r\n## Measured Range: \r\nTOF #0 = %4u mm, \r\nTOF #1 = %4u mm, \r\nTOF #2 = %4u mm\r\n",
(int)sts_tof_distance_data[0],(int)sts_tof_distance_data[1],(int)sts_tof_distance_data[2]); (int)sts_tof_distance_data[0],(int)sts_tof_distance_data[1],(int)sts_tof_distance_data[2]);
} }