Skip to content

Commit

Permalink
increase polling to 10 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
devbis committed Oct 26, 2023
1 parent 42d20fd commit c1eeb8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/app_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ extern "C" {
#define ZCL_RELATIVE_HUMIDITY_MEASUREMENT
#endif

#define DEFAULT_POLL_RATE (10 * (4 * POLL_RATE_QUARTERSECONDS))

/**********************************************************************
* Stack configuration
*/
Expand Down
8 changes: 4 additions & 4 deletions src/zb_appCb.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void zbdemo_bdbInitCb(u8 status, u8 joinedNetwork){
*
*/
if(joinedNetwork){
zb_setPollRate(POLL_RATE);
zb_setPollRate(DEFAULT_POLL_RATE);

#ifdef ZCL_OTA
ota_queryStart(15 * 60);
Expand Down Expand Up @@ -148,7 +148,7 @@ void zbdemo_bdbCommissioningCb(u8 status, void *arg){
case BDB_COMMISSION_STA_SUCCESS:
light_blink_start(2, 200, 200);

zb_setPollRate(POLL_RATE);
zb_setPollRate(DEFAULT_POLL_RATE);

if(steerTimerEvt){
TL_ZB_TIMER_CANCEL(&steerTimerEvt);
Expand Down Expand Up @@ -219,15 +219,15 @@ void sensorDevice_otaProcessMsgHandler(u8 evt, u8 status)

}
}else if(evt == OTA_EVT_COMPLETE){
zb_setPollRate(POLL_RATE);
zb_setPollRate(DEFAULT_POLL_RATE);

if(status == ZCL_STA_SUCCESS){
ota_mcuReboot();
}else{
ota_queryStart(OTA_PERIODIC_QUERY_INTERVAL);
}
}else if(evt == OTA_EVT_IMAGE_DONE){
zb_setPollRate(POLL_RATE);
zb_setPollRate(DEFAULT_POLL_RATE);
}
}
#endif
Expand Down

0 comments on commit c1eeb8e

Please sign in to comment.