Skip to content

Commit

Permalink
Bluetooth: mesh: Fix scene recall for Light Ctrl server
Browse files Browse the repository at this point in the history
The Light Lightness Control Server now resumes the Lightness Controller
automatically after a scene recall, fixing the known issue NCSDK-30033.

Signed-off-by: Stine Akredalen <[email protected]>
  • Loading branch information
akredalen authored and rlubos committed Jan 8, 2025
1 parent 5241ce0 commit 5a083ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,9 @@ Binary libraries
Bluetooth libraries and services
--------------------------------

|no_changes_yet_note|
* :ref:`bt_mesh` library:

* Fixed an issue in the :ref:`bt_mesh_light_ctrl_srv_readme` model to automatically resume the Lightness Controller after recalling a scene (``NCSDK-30033`` known issue).

Common Application Framework
----------------------------
Expand Down
4 changes: 3 additions & 1 deletion subsys/bluetooth/mesh/light_ctrl_srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,8 +1541,10 @@ static void scene_recall(const struct bt_mesh_model *model, const uint8_t data[]
.transition = transition,
};

bool restart = is_enabled(srv);

ctrl_disable(srv);
if (atomic_test_bit(&srv->flags, FLAG_RESUME_TIMER)) {
if (restart || atomic_test_bit(&srv->flags, FLAG_RESUME_TIMER)) {
schedule_resume_timer(srv);
}
lightness_srv_change_lvl(srv->lightness, NULL, &set, &status, true);
Expand Down

0 comments on commit 5a083ee

Please sign in to comment.