-
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: Add timeout for ambient light level report #11579
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 |
subsys/bluetooth/mesh/Kconfig.models
Outdated
@@ -289,6 +289,17 @@ config BT_MESH_LIGHT_CTRL_REG_SPEC_INTERVAL | |||
Update interval of the specification-defined illuminance regulator (in milliseconds). | |||
|
|||
endif #BT_MESH_LIGHT_CTRL_REG_SPEC | |||
|
|||
config BT_MESH_LIGHT_CTRL_AMB_LIGHT_LEVEL_TIMEOUT | |||
int "Ambient light level report timeout" |
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.
Specify unit for this somewhere? Not obvious at all now that it is seconds. Also, a 5 second default sounds like it's very short? I would expect more like several minutes
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.
Your suggestion on the default value?
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.
Well, the task in JIRA says "(say 5 minutes default, set by KConfig option)" which sound more sensible to me.
55637f7
to
337f2d0
Compare
@@ -314,6 +314,10 @@ Bluetooth libraries and services | |||
|
|||
* The :kconfig:option:`BT_MESH_MODEL_SRV_STORE_TIMEOUT` Kconfig option, that is controlling timeout for storing of model states, is replaced by the :kconfig:option:`BT_MESH_STORE_TIMEOUT` Kconfig option. | |||
|
|||
* Added: | |||
|
|||
* Add a new Kconfig option, :kconfig:option:`BT_MESH_LIGHT_CTRL_AMB_LIGHT_LEVEL_TIMEOUT`, that configures timeout to reset the ambient light level to zero. |
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.
* Add a new Kconfig option, :kconfig:option:`BT_MESH_LIGHT_CTRL_AMB_LIGHT_LEVEL_TIMEOUT`, that configures timeout to reset the ambient light level to zero. | |
* The :kconfig:option:`BT_MESH_LIGHT_CTRL_AMB_LIGHT_LEVEL_TIMEOUT` Kconfig option that configures a timeout to reset the ambient light level to zero. |
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.
Also, move Added list to the top, above Updated list.
subsys/bluetooth/mesh/Kconfig.models
Outdated
Defines a time since last received sensor report with the ambient light level after which | ||
the Light Lightness Control Server sets the ambient light level to zero and passes it to | ||
the regulator. This option helps to avoid an issue when the regulator gets stuck with an | ||
old output value, which doesn't trigger new report from sensor. |
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.
Defines a time since last received sensor report with the ambient light level after which | |
the Light Lightness Control Server sets the ambient light level to zero and passes it to | |
the regulator. This option helps to avoid an issue when the regulator gets stuck with an | |
old output value, which doesn't trigger new report from sensor. | |
Defines time in seconds the Light Lightness Control Server waits after receiving the sensor report with the | |
ambient light level before setting the ambient light level to zero and passing it to the regulator. | |
This option helps avoiding an issue with the regulator getting stuck with an old output value, and not | |
triggering new report from the sensor. |
337f2d0
to
0f28eae
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. |
0f28eae
to
4c12292
Compare
subsys/bluetooth/mesh/Kconfig.models
Outdated
range 0 16777 | ||
help | ||
Defines time in seconds the Light Lightness Control Server waits after receiving the | ||
Sensor Status message with the present ambient light level property id before setting |
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.
Sensor Status message with the present ambient light level property id before setting | |
Sensor Status message with the present ambient light level property ID before setting |
@@ -310,6 +310,10 @@ Bluetooth libraries and services | |||
|
|||
* :ref:`bt_mesh` library: | |||
|
|||
* Added: | |||
|
|||
* The :kconfig:option:`BT_MESH_LIGHT_CTRL_AMB_LIGHT_LEVEL_TIMEOUT` Kconfig option that configures a timeout to reset the ambient light level to zero. |
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.
timeout to reset
or timeout before resetting?
To me the second one sounds better. What do you think?
Strange I did not pick up on this yesterday.
4c12292
to
967ce41
Compare
Add timeout for the last ambient light level report received from a sensor. This will make the regulator drive the lightness value high up to avoid being stalled in some old value when no reports are coming from the sensor. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Test that ambient light level timer times out correctly. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
967ce41
to
6d3588b
Compare
Add timeout for the last ambient light level report received from a
sensor. This will make the regulator drive the lightness value high up
to avoid being stalled in some old value when no reports are coming from
the sensor.
Test that ambient light level timer times out correctly.