Skip to content

Commit

Permalink
Change send packet delay to save energy
Browse files Browse the repository at this point in the history
* Send packets every 60 sec if new pulses exists.
* don't send packet every pulses
  • Loading branch information
fairecasoimeme committed Dec 2, 2024
1 parent da65ee5 commit f9b3414
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions PulsesSensor/Source/app_sleep_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,44 +172,8 @@ PUBLIC void vAttemptToSleep(void)
if (u16ActivityCount>2)
{
DBG_vPrintf(TRACE_SLEEP_HANDLER , "\r\n------------------u16ActivityCount > 3 : \r\n");
/*PWR_teStatus result;
result = PWR_eRemoveActivity(&sWake);
DBG_vPrintf(TRACE_SLEEP_HANDLER , "\r\n------------------PWRM_eRemoveActivity : %d \r\n",result);

result = PWRM_eFinishActivity();
DBG_vPrintf(TRACE_SLEEP_HANDLER , "\r\n------------------PWRM_eRemoveActivity : %d \r\n",result);*/

}

/* Check if Wake timer 0 is running.*/
/*if (( (SYSCON->WKT_STAT&SYSCON_WKT_STAT_WKT0_RUNNING_MASK) == SYSCON_WKT_STAT_WKT0_RUNNING_MASK))
{
DBG_vPrintf(TRACE_SLEEP_HANDLER , "\r\nSLEEP: bDeepSleep FALSE");
bDeepSleep = FALSE;
vScheduleSleep();
}
else
{
DBG_vPrintf(TRACE_SLEEP_HANDLER , "\r\nSLEEP: bDeepSleep TRUE");
#ifdef CLD_OTA
// OTA allowing deep sleep ?
if (bOTADeepSleepAllowed())
{
// Set Flag as True
bDeepSleep = TRUE;
}
// OTA not allowing deep sleep
else
{
// Set Flag as False
bDeepSleep = FALSE;
}
#else
bDeepSleep = TRUE;
#endif
vScheduleSleep();
}*/


DBG_vPrintf(TRACE_SLEEP_HANDLER , "\r\nSLEEP: bDeepSleep FALSE");
bDeepSleep = FALSE;
Expand Down

0 comments on commit f9b3414

Please sign in to comment.