most updated for warm up upload
This commit is contained in:
parent
f2874f9248
commit
17e9ecf237
|
@ -963,12 +963,15 @@ static void OnTxTimerEvent(void *context)
|
|||
/* USER CODE END OnTxTimerEvent_1 */
|
||||
upload_message_timer =1U;
|
||||
//UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventP9), CFG_SEQ_Prio_0);
|
||||
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
|
||||
|
||||
/*Wait for next tx slot*/
|
||||
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
|
||||
|
||||
/*Wait for next tx slot*/
|
||||
UTIL_TIMER_Start(&TxTimer);
|
||||
if (bring_up_mark == 1)
|
||||
{
|
||||
|
||||
// FOR WARM UP UPLOAD QUICKLY ========================
|
||||
if (bring_up_mark == 1)
|
||||
{
|
||||
if (bring_up_count ++ >3)
|
||||
{
|
||||
uint32_t periodicity = (sts_cfg_nvm.periodicity); //TxPeriodicty interval
|
||||
|
@ -985,7 +988,6 @@ static void OnTxTimerEvent(void *context)
|
|||
bring_up_mark = 0;
|
||||
bring_up_count =0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN OnTxTimerEvent_2 */
|
||||
|
@ -1072,42 +1074,10 @@ static void OnJoinRequest(LmHandlerJoinParams_t *joinParams)
|
|||
STS_LoRa_WAN_Joined = (uint8_t) joinParams->Mode;
|
||||
APP_LOG(TS_OFF, VLEVEL_L,"\r\n STS_LoRa_WAN_Joined = %s \r\n", (STS_LoRa_WAN_Joined == 1)?"ABP":"OTAA");
|
||||
|
||||
//STS_SENSOR_Upload_Message(LORAWAN_USER_APP_PORT, 30, (char*)"YunHorn SmarToilets 2024");
|
||||
bring_up_mark = 1;
|
||||
// for warm up upload quickly
|
||||
bring_up_mark = 1;
|
||||
OnYunhornSTSHeartBeatPeriodicityChanged(HeartBeatPeriodicity);
|
||||
|
||||
|
||||
|
||||
//restore NVM TxPeriodicity interval
|
||||
//TxPeriodicity= periodicity*1000; // to ms
|
||||
|
||||
//OnTxPeriodicityChanged(TxPeriodicity);
|
||||
/*
|
||||
UTIL_TIMER_Stop(&TxTimer);
|
||||
UTIL_TIMER_SetPeriod(&TxTimer, TxPeriodicity);
|
||||
UTIL_TIMER_Start(&TxTimer);
|
||||
*/
|
||||
/*
|
||||
STS_SENSOR_Upload_Message(LORAWAN_USER_APP_PORT, 30, (char*)"YunHorn SmarToilets 2024");
|
||||
|
||||
uint32_t periodicity = (sts_cfg_nvm.periodicity); //TxPeriodicty interval
|
||||
if ((char)sts_cfg_nvm.unit =='M') {
|
||||
periodicity *= 60;
|
||||
} else if ((char) sts_cfg_nvm.unit =='H') {
|
||||
periodicity *= 3600;
|
||||
} else if ((char) sts_cfg_nvm.unit =='S') {
|
||||
periodicity *= 1;
|
||||
}
|
||||
|
||||
// TxPeriodicity= periodicity*1000; // to ms
|
||||
|
||||
// OnTxPeriodicityChanged(TxPeriodicity);
|
||||
|
||||
|
||||
// UTIL_TIMER_SetPeriod(&TxTimer, TxPeriodicity);
|
||||
// UTIL_TIMER_Start(&TxTimer);
|
||||
*/
|
||||
// OnYunhornSTSHeartBeatPeriodicityChanged(HeartBeatPeriodicity);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue