changed flag to zero after preparing sending data

This commit is contained in:
Yunhorn 2023-05-25 17:56:47 +08:00
parent b79d044fec
commit 5b100a6427
2 changed files with 9 additions and 4 deletions

View File

@ -529,10 +529,15 @@ void STS_Combined_Status_Processing(void)
}
}
if ((sts_rss_result_changed_flag + sts_reed_hall_changed_flag + sts_tof_result_changed_flag +sts_water_leakage_changed_flag) != 0 )
if ((sts_rss_result_changed_flag)|| (sts_reed_hall_changed_flag) || (sts_tof_result_changed_flag) || (sts_water_leakage_changed_flag))
{
sensor_data_ready = 1;
STS_PRESENCE_SENSOR_Prepare_Send_Data();
sts_rss_result_changed_flag =0;
sts_reed_hall_changed_flag =0;
sts_tof_result_changed_flag =0;
sts_water_leakage_changed_flag=0;
}
}
void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim)

View File

@ -2044,7 +2044,7 @@ void STS_SENSOR_Upload_Message(uint8_t appDataPort, uint8_t appBufferSize, char
AppData.Port = appDataPort;
AppData.BufferSize = (sts_service_mask >1 ?0:appBufferSize);
APP_LOG(TS_OFF, VLEVEL_L, "###########Service Mask = %d Buffer Size =%d \r\n", sts_service_mask, AppData.BufferSize);
//APP_LOG(TS_OFF, VLEVEL_L, "###########Service Mask = %d Buffer Size =%d \r\n", sts_service_mask, AppData.BufferSize);
if ((JoinLedTimer.IsRunning) && (LmHandlerJoinStatus() == LORAMAC_HANDLER_SET))
{