remove unused code and defines

This commit is contained in:
Yunhorn 2023-07-03 14:18:03 +08:00
parent 440fd9cc33
commit f422542c0a
1 changed files with 30 additions and 28 deletions

View File

@ -315,7 +315,7 @@ static void OnJoinTimerLedEvent(void *context);
* @brief Yunhorn STS Occupancy RSS WakeUP timer callback function
* @param context ptr of STS RSS WakeUp context
*/
static void OnYunhornSTSOORSSWakeUpTimerEvent(void *context);
//static void OnYunhornSTSOORSSWakeUpTimerEvent(void *context);
/**
* @brief Yunhorn STS Heart Beat Periodicity Chagne function
@ -334,7 +334,7 @@ static void OnYunhornSTSHeartBeatTimerEvent(void *context);
* @brief Yunhorn STS Uploading Message periodically
* @param context ptr of context
*/
static void OnYunhornSTSUploadingMessageEvent(void *context);
//static void OnYunhornSTSUploadingMessageEvent(void *context);
/**
* @brief Yunhorn RFAC Handle process
@ -449,17 +449,17 @@ static UTIL_TIMER_Object_t JoinLedTimer;
/**
* @brief Timer to handle the YunHorn STS RSS WakeUP Checking
*/
static UTIL_TIMER_Object_t YunhornSTSRSSWakeUpTimer;
//static UTIL_TIMER_Object_t YunhornSTSRSSWakeUpTimer;
/**
* @brief Timer to handle the YunHorn STS Sensor Sampling Process
*/
static UTIL_TIMER_Object_t YunhornSTSSamplingCheckTimer;
//static UTIL_TIMER_Object_t YunhornSTSSamplingCheckTimer;
/**
* @brief Timer to handle the YunHorn STS Sensor Uploading Process
*/
static UTIL_TIMER_Object_t YunhornSTSUploadingMessageTimer;
//static UTIL_TIMER_Object_t YunhornSTSUploadingMessageTimer;
/**
* @brief Timer to handle the YunHorn STS Sensor Heart Beat Process
@ -1188,6 +1188,7 @@ static void OnRestoreContextRequest(void *nvm, uint32_t nvm_size)
* @brief Yunhorn STS Occupancy RSS WakeUP timer callback function, act as sampling process
* @param context ptr of STS RSS WakeUp context
*/
/*
static void OnYunhornSTSOORSSWakeUpTimerEvent(void *context)
{
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventP2), CFG_SEQ_Prio_0);
@ -1198,7 +1199,7 @@ static void OnYunhornSTSOORSSWakeUpTimerEvent(void *context)
}
}
*/
/**
* @brief Yunhorn STS Sensor Live Heart Beat Periodicity/interval Change callback function
* @param context ptr of STS Live Heart Beat context
@ -1267,38 +1268,38 @@ static void OnYunhornSTSHeartBeatPeriodicityChanged(uint32_t periodicity)
* @param context ptr of STS RSS WakeUp context
*/
static void OnYunhornSTSSamplingPeriodicityChanged(uint32_t periodicity)
{
//static void OnYunhornSTSSamplingPeriodicityChanged(uint32_t periodicity)
//{
/* USER CODE BEGIN OnTxPeriodicityChanged_1 */
/* USER CODE END OnTxPeriodicityChanged_1 */
SamplingPeriodicity = periodicity;
// SamplingPeriodicity = periodicity;
if (SamplingPeriodicity == 0)
{
// if (SamplingPeriodicity == 0)
// {
/* Revert to application default periodicity */
SamplingPeriodicity = APP_TX_DUTYCYCLE;
}
// SamplingPeriodicity = APP_TX_DUTYCYCLE;
// }
/* Update timer periodicity */
#if (defined(YUNHORN_STS_O6_ENABLED) || defined(YUNHORN_STS_R0_ENABLED))
UTIL_TIMER_Stop(&YunhornSTSRSSWakeUpTimer);
UTIL_TIMER_SetPeriod(&YunhornSTSRSSWakeUpTimer, SamplingPeriodicity);
UTIL_TIMER_Start(&YunhornSTSRSSWakeUpTimer);
APP_LOG(TS_OFF, VLEVEL_L,"**************** Sampling Timer Periodicity = %u (sec)\r\n", (SamplingPeriodicity/1000) );
//#if (defined(YUNHORN_STS_O6_ENABLED) || defined(YUNHORN_STS_R0_ENABLED))
// UTIL_TIMER_Stop(&YunhornSTSRSSWakeUpTimer);
// UTIL_TIMER_SetPeriod(&YunhornSTSRSSWakeUpTimer, SamplingPeriodicity);
// UTIL_TIMER_Start(&YunhornSTSRSSWakeUpTimer);
// APP_LOG(TS_OFF, VLEVEL_L,"**************** Sampling Timer Periodicity = %u (sec)\r\n", (SamplingPeriodicity/1000) );
#else
UTIL_TIMER_Stop(&YunhornSTSSamplingCheckTimer);
UTIL_TIMER_SetPeriod(&YunhornSTSSamplingCheckTimer, SamplingPeriodicity);
UTIL_TIMER_Start(&YunhornSTSSamplingCheckTimer);
APP_LOG(TS_OFF, VLEVEL_L,"**************** SamplingPeriodicity = %u (sec)\r\n", (SamplingPeriodicity/1000) );
#endif
//#else
// UTIL_TIMER_Stop(&YunhornSTSSamplingCheckTimer);
// UTIL_TIMER_SetPeriod(&YunhornSTSSamplingCheckTimer, SamplingPeriodicity);
// UTIL_TIMER_Start(&YunhornSTSSamplingCheckTimer);
// APP_LOG(TS_OFF, VLEVEL_L,"**************** SamplingPeriodicity = %u (sec)\r\n", (SamplingPeriodicity/1000) );
//#endif
/* USER CODE BEGIN OnTxPeriodicityChanged_2 */
/* USER CODE END OnTxPeriodicityChanged_2 */
}
//}
/*
@ -1317,6 +1318,7 @@ static void OnYunhornSTSSamplingPeriodicityChanged(uint32_t periodicity)
* @brief Yunhorn STS Sensor Uploading Message Event callback function
* @param context ptr of STS Uploading Message context
*/
/*
static void OnYunhornSTSUploadingMessageEvent(void *context)
{
if (STS_LoRa_WAN_Joined )
@ -1330,12 +1332,12 @@ static void OnYunhornSTSUploadingMessageEvent(void *context)
#endif
}
}
*/
/**
* @brief Yunhorn STS Sensor Sampling Check Timer callback function
* @param context ptr of STS Sampling Check context
*/
/*
static void OnYunhornSTSSamplingCheckTimerEvent(void *context)
{
if (STS_LoRa_WAN_Joined )
@ -1348,7 +1350,7 @@ static void OnYunhornSTSSamplingCheckTimerEvent(void *context)
#endif
}
}
*/
/**
* @brief Yunhorn STS Sensor Heart Beat Timer callback function