-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add content to "multiple-sensors" section #308
Conversation
index.bs
Outdated
|
||
Conversely, multiple {{Sensor|Sensors}} of the same [=sensor type=] may need to be created, when |
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.
s/Conversely/On the other hand ?
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.
s/may need to be created/may be created
index.bs
Outdated
@@ -1503,12 +1503,17 @@ exposing [=low-level=] sensor APIs, but should also expose | |||
|
|||
<h3 id="multiple-sensors">When is Enabling Multiple Sensors of the Same Type Not the Right Choice?</h3> | |||
|
|||
TODO: provide guidance on when to: | |||
It is possible to construct multiple {{Sensor}} instances of the same [=sensor type=], however, | |||
it is not advisable to do that when these instances are constructed using equal {{SensorOptions}}, |
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.
"it is not advisable to have multiple {{Sensor}} objects that were constructed with the same construction parameters as it can unnecessarily increase CPU/power load. Instead, multiple observers should add event listeners to a single {{Sensor}} object. " wdyt?
index.bs
Outdated
|
||
Conversely, multiple {{Sensor|Sensors}} of the same [=sensor type=] may need to be created, when | ||
they are intended to be used with different settings, such as: [=requested sampling frequency=], |
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.
if they have different properties
index.bs
Outdated
- allow multiple sensors of the same type to be instantiated, | ||
- create different interfaces that inherit from {{Sensor}}, | ||
- add constructor parameters to tweak sensors settings (e.g. setting required accuracy). | ||
In cases when multiple observers are interested of notifications for a newly available |
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.
interested in notifications of
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.
done
index.bs
Outdated
- create different interfaces that inherit from {{Sensor}}, | ||
- add constructor parameters to tweak sensors settings (e.g. setting required accuracy). | ||
In cases when multiple observers are interested of notifications for a newly available | ||
[=sensor reading=], [=event listener=] should be added for a {{Sensor}} instead of creating |
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.
IIUC, perhaps:
an event listener can be added on a single Sensor instance instead of creating
We try to generally avoid using RFC 2119 terms in informative sections, thus s/should/can/.
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.
done
index.bs
Outdated
|
||
Conversely, multiple {{Sensor|Sensors}} of the same [=sensor type=] may need to be created, when |
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.
s/may/can/
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.
done
f67342a
to
f46c9ae
Compare
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.
lgtm
Preview | Diff