remove unused code in lora_app.c, when LmHandler is busy or not
This commit is contained in:
parent
7d56514685
commit
3d3534e747
|
@ -995,39 +995,35 @@ static void SendTxData(void)
|
|||
AppData.BufferSize = (sts_service_mask > STS_SERVICE_MASK_L1? 0:i);
|
||||
|
||||
APP_LOG(TS_OFF, VLEVEL_L, "\r\n\n\n** ** AppData.PORT =%3d ** ** AppData.BufferSize=%3d ** Count Size=%3d\r\n", AppData.Port, AppData.BufferSize, i);
|
||||
if (i!=0)
|
||||
{
|
||||
//AppData.BufferSize = (sts_service_mask > STS_SERVICE_MASK_L1? 0:i);
|
||||
|
||||
if ((JoinLedTimer.IsRunning) && (LmHandlerJoinStatus() == LORAMAC_HANDLER_SET))
|
||||
{
|
||||
UTIL_TIMER_Stop(&JoinLedTimer);
|
||||
HAL_GPIO_WritePin(LED3_GPIO_Port, LED3_Pin, GPIO_PIN_RESET); /* LED_RED */
|
||||
}
|
||||
if ((JoinLedTimer.IsRunning) && (LmHandlerJoinStatus() == LORAMAC_HANDLER_SET))
|
||||
{
|
||||
UTIL_TIMER_Stop(&JoinLedTimer);
|
||||
HAL_GPIO_WritePin(LED3_GPIO_Port, LED3_Pin, GPIO_PIN_RESET); /* LED_RED */
|
||||
}
|
||||
|
||||
status = LmHandlerSend(&AppData, LmHandlerParams.IsTxConfirmed, false);
|
||||
if (LORAMAC_HANDLER_SUCCESS == status)
|
||||
status = LmHandlerSend(&AppData, LmHandlerParams.IsTxConfirmed, false);
|
||||
if (LORAMAC_HANDLER_SUCCESS == status)
|
||||
{
|
||||
APP_LOG(TS_ON, VLEVEL_L, "SEND REQUEST\r\n");
|
||||
}
|
||||
else if (LORAMAC_HANDLER_DUTYCYCLE_RESTRICTED == status)
|
||||
{
|
||||
nextTxIn = LmHandlerGetDutyCycleWaitTime();
|
||||
if (nextTxIn > 0)
|
||||
{
|
||||
APP_LOG(TS_ON, VLEVEL_L, "SEND REQUEST\r\n");
|
||||
}
|
||||
else if (LORAMAC_HANDLER_DUTYCYCLE_RESTRICTED == status)
|
||||
{
|
||||
nextTxIn = LmHandlerGetDutyCycleWaitTime();
|
||||
if (nextTxIn > 0)
|
||||
{
|
||||
APP_LOG(TS_ON, VLEVEL_L, "Next Tx in : ~%d second(s)\r\n", (nextTxIn / 1000));
|
||||
}
|
||||
}
|
||||
|
||||
if (EventType == TX_ON_TIMER)
|
||||
{
|
||||
UTIL_TIMER_Stop(&TxTimer);
|
||||
UTIL_TIMER_SetPeriod(&TxTimer, MAX(nextTxIn, TxPeriodicity));
|
||||
UTIL_TIMER_Start(&TxTimer);
|
||||
APP_LOG(TS_ON, VLEVEL_L, "Next Tx in : ~%d second(s)\r\n", (nextTxIn / 1000));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (EventType == TX_ON_TIMER)
|
||||
{
|
||||
UTIL_TIMER_Stop(&TxTimer);
|
||||
UTIL_TIMER_SetPeriod(&TxTimer, MAX(nextTxIn, TxPeriodicity));
|
||||
UTIL_TIMER_Start(&TxTimer);
|
||||
}
|
||||
|
||||
/* USER CODE END SendTxData_1 */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue