- From: Martijn Thé via GitHub <sysbot+gh@w3.org>
- Date: Mon, 30 Oct 2017 13:06:17 +0000
- To: public-device-apis-log@w3.org
@alexshalamov thanks for your comments.
Some ideas w.r.t. the API design, while keeping in mind:
1. it may not make sense to calibrate a particular class of Sensor.
2. it may not be possible to actual calibrate the sensor due to lack of platform support.
```
enum SensorCalibrationStatus {
"unavailable",
"uncalibrated",
"calibrated",
}
interface Sensor : EventTarget {
readonly attribute SensorCalibrationStatus calibrationStatus;
void calibrate();
attribute EventHandler oncalibrationchange;
...
}
```
Re. 1 & 2: if a sensor doesn't need to be calibrated or cannot be calibrated for whatever reason, `calibrationStatus` would return `"unavailable"`. `calibrate()` would be a no-op in that case and `oncalibrationchange` would never fire.
--
GitHub Notification of comment by martijnthe
Please view or discuss this issue at https://github.com/w3c/sensors/issues/324#issuecomment-340437812 using your GitHub account
Received on Monday, 30 October 2017 13:06:18 UTC