Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

Commit

Permalink
fix: moved led behaviour
Browse files Browse the repository at this point in the history
New device mode(active/passive) led behaviour
is only set if the device is in passive mode when
the movement timeout handler triggeres, after
publishing data.

Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
  • Loading branch information
simensrostad committed Mar 25, 2020
1 parent 393297d commit 2898c8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,11 @@ static void mov_timeout_work_fn(struct k_work *work)
if (!cloud_data.active) {
LOG_INF("Movement timeout triggered");
cloud_update();
k_delayed_work_submit(&led_device_mode_set_work, K_SECONDS(15));
}

k_delayed_work_submit(&mov_timeout_work,
K_SECONDS(cloud_data.mov_timeout));
k_delayed_work_submit(&led_device_mode_set_work, K_SECONDS(15));
}

static void work_init(void)
Expand Down

0 comments on commit 2898c8b

Please sign in to comment.