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