Skip to content

Commit

Permalink
modules: trigger: Poll on button press when blocked
Browse files Browse the repository at this point in the history
Poll for cloud changes and FOTA in blocked state.
Previously we only restarted the frequent poll duration timer.
This change allows users to get the latest cloud config / FOTA job
right away without waiting for the next poll interval.

Signed-off-by: Simen S. Røstad <[email protected]>
  • Loading branch information
simensrostad committed Aug 19, 2024
1 parent 27b5e19 commit 02da36a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/modules/trigger/trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ static void blocked_run(void *o)
user_object->button_number);

frequent_poll_duration_timer_start(true);
trigger_send(TRIGGER_POLL, K_SECONDS(1));
trigger_send(TRIGGER_FOTA_POLL, K_SECONDS(1));

} else if (user_object->chan == &CONFIG_CHAN) {
LOG_DBG("Configuration received, refreshing poll duration timer");
Expand Down

0 comments on commit 02da36a

Please sign in to comment.