-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: Mesh: Fix dim to dark behavior #12506
Bluetooth: Mesh: Fix dim to dark behavior #12506
Conversation
Test specificationCI/Jenkins/NRF
CI/Jenkins/integration
Detailed information of selected test modules Note: This message is automatically posted and updated by the CI |
2f01e4b
to
51bdc9f
Compare
51bdc9f
to
2712d9b
Compare
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
2712d9b
to
19765fc
Compare
There is an ongoing discussion for specs about the expected behavior here, will leave this PR DNM until discussion about specs is done |
* When performing a non-instantaneous state change, the applicaton must call | ||
* @ref bt_mesh_lightness_start_value. The change must move instantaneously to the start | ||
* value returned by this function and start gradually changing from that point over the | ||
* time specified by the transition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* When performing a non-instantaneous state change, the applicaton must call | |
* @ref bt_mesh_lightness_start_value. The change must move instantaneously to the start | |
* value returned by this function and start gradually changing from that point over the | |
* time specified by the transition. | |
* When performing a non-instantaneous state change, the applicaton must call | |
* @ref bt_mesh_lightness_start_value. The change must move instantaneously | |
* to the start value returned by this function, and then gradually change from | |
* that value over time specified by the transition. |
/** @brief Get the starting point for a non-instantaneous change in lightness. | ||
* | ||
* When performing a non-instantaneous change of the lightness state, the change | ||
* should immediately jump to this starting value and then start gradually changing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* should immediately jump to this starting value and then start gradually changing. | |
* should immediately jump to this starting value and then gradually start changing. |
/* Do not clamp to range when dimming down from zero, to avoid | ||
* a dim down to cause the light to turn on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* Do not clamp to range when dimming down from zero, to avoid | |
* a dim down to cause the light to turn on. | |
/* Do not clamp to range when dimming down from zero to avoid | |
* the light to turn on when dimmed down. |
/* Clamp the value to the lightness range to prevent it be moved | ||
* back to zero in binding with Generic Level state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* Clamp the value to the lightness range to prevent it be moved | |
* back to zero in binding with Generic Level state. | |
/* Clamp the value to the lightness range to prevent that it moves | |
* back to zero in binding with Generic Level state. |
19765fc
to
a408ae7
Compare
This commit fixes issues with Move Set and Delta Set handlers not handling dimming starting from 0 correctly. * Clamp targets to 0 when dimming down from 0, instead of clamping to RANGE_MIN, to avoid a message requesting a dim down causing the light to actually turn on. * Take the gap between 0 and RANGE_MIN into account when computing the transition time for a move set before this is sent to the application callback, to avoid a slow transition for dims starting at 0 * Small bug fixes * Range converted to actual in delta set to match with the delta and target_actual * Do not compute transition in move set if target == current Signed-off-by: Ludvig Samuelsen Jordet <[email protected]>
This updates the samples and tester to correctly transition the lightness state when dimming up from zero when a RANGE_MIN is set. It also updates the documentation for the callback to mention this requirement. Signed-off-by: Ludvig Samuelsen Jordet <[email protected]>
a408ae7
to
4910bdf
Compare
Fixes issues with Move Set and Delta Set handlers not
handling dimming starting from 0 correctly.
RANGE_MIN, to avoid a message requesting a dim down causing the light
to actually turn on.
transition time for a move set before this is sent to the application
callback, to avoid a slow transition for dims starting at 0
lightness state when dimming up from zero when a RANGE_MIN is set.
requirement.
target_actual