Re: [sensors] Interface for user-involving calibration?

@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