Skip to content

Commit

Permalink
lib: Use default frequency (from 2Hz to 1Hz)
Browse files Browse the repository at this point in the history
Bug: WebThingsIO/gateway#1567
Change-Id: Iaca4775ec97bcc8bcbdcf0ae66fab731cea43784
Signed-off-by: Philippe Coval <p.coval@samsung.com>
  • Loading branch information
rzr committed Feb 28, 2019
1 parent a221ba3 commit 7bbe947
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions generic-sensors-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class GenericSensorsProperty extends Property {
this.setCachedValue(this.device.sensors.temperature.celsius);
} else if (this.device.sensorType == 'ambientLightSensor') {
this.setCachedValue(this.device.sensors.ambientLight.illuminance);
}
}
}
this.device.notifyPropertyChanged(this);
}
Expand All @@ -132,9 +132,9 @@ class GenericSensorsDevice extends Device {

this.sensors = {};
if (config.sensorType === 'temperatureSensor') {
this.sensors.temperature = new GenericSensors.Temperature({ frequency: 2 });
this.sensors.temperature = new GenericSensors.Temperature();
} else if (config.sensorType === 'ambientLightSensor') {
this.sensors.ambientLight = new GenericSensors.AmbientLight({ frequency: 2 });
this.sensors.ambientLight = new GenericSensors.AmbientLight();
}

for (const prop of config.properties) {
Expand Down

0 comments on commit 7bbe947

Please sign in to comment.