-
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
Initial improvements for use cases document #256
Conversation
4e489a8
to
2c03e01
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.
Thanks for these improvements, approved with nits.
usecases.bs
Outdated
|
||
|
||
Use Cases {#usecases} | ||
Use Cases and requeiements {#usecases-and-requirements} |
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.
requirements
usecases.bs
Outdated
===================== | ||
|
||
Displaying the position of the user on a map in real time {#display-realtime} | ||
--------------------- | ||
The use cases and requirements for the sensors may differ from one application to another. In |
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.
remove "may"
usecases.bs
Outdated
|
||
Environmental sensors might be used in applications like: home automation, accesibility, personal |
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.
accessibility
usecases.bs
Outdated
|
||
Using the proposed Generic Sensor API, application level code looks like this: | ||
- [=Ambient light 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.
usecases.bs
Outdated
Using the proposed Generic Sensor API, application level code looks like this: | ||
- [=Ambient light sensor=] | ||
- [=Proximity sensor=] | ||
- [=Magnetometer=] |
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.
usecases.bs
Outdated
|
||
<div class="example"> | ||
In this example, we create simple linear free fall detection 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.
a simple
usecases.bs
Outdated
In this example, we create simple linear free fall detection sensor. | ||
|
||
<pre highlight="js"> | ||
class FreeFallSensor extends Accelerometer { |
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.
Ping @kenchris to review the JS code style of the examples.
usecases.bs
Outdated
|
||
<div class="example"> | ||
In this simplified example, we define FusionSensor class that aggregates multiple sources and |
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.
FusionSensor
usecases.bs
Outdated
} | ||
|
||
// Stateful algorithm that finds brightest spot during calibration phase and uses | ||
// it as a fixed frame of reference to calculate relative orientation from brigtest |
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.
brightest
usecases.bs
Outdated
|
||
- Reed switch and hall effect sensors | ||
- Significant motion, no motion, tap, flat, free fall, low-g and high-g sensors | ||
- Laser or infrared switch sensors | ||
|
||
Security and Privacy Considerations {#security-and-privacy} |
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.
We can remove this section from this use cases document, needed only for API specs.
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.
@anssiko I removed it initially, but then, bikeshed throws an error.
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.
You can try Status: NOTE
, and see if that helps. Or build with -f
.
usecases.bs
Outdated
} | ||
} | ||
|
||
get inFreeFall { |
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.
inFreeFall()
as pointed out elsewhere.
usecases.bs
Outdated
|
||
This group of sensors is based on inertia and relevant measuring concepts. Usually, inertial | ||
sensors are part of IMU (Inertial Measurements Unit) that measure [=acceleration=] using | ||
accelerometer and [=rotational rate=] using gyroscope. [=Magnetometer=] might be part of IMU and |
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.
link to Gyroscope?
usecases.bs
Outdated
set onreading(func) { | ||
super.onreading = () => { | ||
this.inFreeFall_ = Math.hypot(super.x, super.y, super.z) < 0.5; | ||
func(); |
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.
shouldn't func()
be called optionally?
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
My review comments have been addressed, feel free to land this @alexshalamov. |
Fixes #181