Skip to content

Commit

Permalink
Fix power saving
Browse files Browse the repository at this point in the history
  • Loading branch information
nurikk committed Sep 29, 2020
1 parent 4cf171c commit ca10c2b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Source/zcl_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "AF.h"
#include "OSAL.h"
#include "OSAL_Clock.h"

#include "OSAL_PwrMgr.h"
#include "ZComDef.h"
#include "ZDApp.h"
#include "ZDNwkMgr.h"
Expand Down Expand Up @@ -235,24 +235,24 @@ static void zclApp_ReadSensors(void) {
switch (currentSensorsReadingPhase++) {
case 0:
POWER_ON_SENSORS();
break;
case 1:
zclApp_ReadLumosity();
osal_pwrmgr_task_state(zclApp_TaskID, PWRMGR_HOLD);
break;

case 2:
case 1:
zclBattery_Report();
zclApp_ReadSoilHumidity();
break;
case 3:
case 2:
zclApp_InitBME280(&bme_dev);
break;

case 4:
case 3:
zclApp_ReadBME280(&bme_dev);
osal_pwrmgr_task_state(zclApp_TaskID, PWRMGR_CONSERVE);
break;

case 5:
case 4:
zclApp_ReadDS18B20();
break;
default:
Expand Down

0 comments on commit ca10c2b

Please sign in to comment.