mirror of https://github.com/arendst/Tasmota.git
parent
6684a6e515
commit
c5e95b95d4
|
@ -71,7 +71,7 @@ void Vl53l1Every_250MSecond(void) {
|
|||
#ifdef USE_DOMOTICZ
|
||||
void Vl53l1Every_Second(void) {
|
||||
char distance[FLOATSZ];
|
||||
dtostrfd((float)vl53l1x_sensors.distance / 1000, 3, distance);
|
||||
dtostrfd((float)vl53l1x_sensors.distance / 10, 1, distance);
|
||||
DomoticzSensor(DZ_ILLUMINANCE, distance);
|
||||
}
|
||||
#endif // USE_DOMOTICZ
|
||||
|
@ -80,9 +80,7 @@ void Vl53l1Show(bool json) {
|
|||
if (json) {
|
||||
#ifdef USE_DOMOTICZ
|
||||
if (0 == tele_period) {
|
||||
char distance[FLOATSZ];
|
||||
dtostrfd((float)vl53l1x_sensors.distance / 1000, 3, distance);
|
||||
DomoticzSensor(DZ_ILLUMINANCE, distance);
|
||||
Vl53l1Every_Second();
|
||||
}
|
||||
#endif // USE_DOMOTICZ
|
||||
ResponseAppend_P(PSTR(",\"VL53L1X\":{\"" D_JSON_DISTANCE "\":%d}"), vl53l1x_sensors.distance);
|
||||
|
|
Loading…
Reference in New Issue