No DOMOTICZ

This commit is contained in:
Jason2866 2020-08-27 14:43:20 +02:00
parent e6d763f10b
commit d85954db35
1 changed files with 8 additions and 2 deletions

View File

@ -67,20 +67,26 @@ void Vl53l1Every_250MSecond(void) {
vl53l1x_distance = dist; vl53l1x_distance = dist;
} }
/* No Distance support for Domoticz
#ifdef USE_DOMOTICZ #ifdef USE_DOMOTICZ
void Vl53l1Every_Second(void) { void Vl53l1Every_Second(void) {
DomoticzSensor(DZ_ILLUMINANCE, vl53l1x_distance); DomoticzSensor(DZ_ILLUMINANCE, vl53l1x_distance);
} }
#endif // USE_DOMOTICZ #endif // USE_DOMOTICZ
*/
void Vl53l1Show(boolean json) { void Vl53l1Show(boolean json) {
if (json) { if (json) {
ResponseAppend_P(PSTR(",\"VL53L1X\":{\"" D_JSON_DISTANCE "\":%d}"), vl53l1x_distance); ResponseAppend_P(PSTR(",\"VL53L1X\":{\"" D_JSON_DISTANCE "\":%d}"), vl53l1x_distance);
/* No Distance support for Domoticz
#ifdef USE_DOMOTICZ #ifdef USE_DOMOTICZ
if (0 == tele_period) { if (0 == tele_period) {
DomoticzSensor(DZ_ILLUMINANCE, vl53l1x_distance); DomoticzSensor(DZ_ILLUMINANCE, vl53l1x_distance);
} }
#endif // USE_DOMOTICZ #endif // USE_DOMOTICZ
*/
#ifdef USE_WEBSERVER #ifdef USE_WEBSERVER
} else { } else {
WSContentSend_PD(HTTP_SNS_VL53L1X, vl53l1x_distance); WSContentSend_PD(HTTP_SNS_VL53L1X, vl53l1x_distance);
@ -106,11 +112,11 @@ bool Xsns77(byte function)
case FUNC_EVERY_250_MSECOND: case FUNC_EVERY_250_MSECOND:
Vl53l1Every_250MSecond(); Vl53l1Every_250MSecond();
break; break;
#ifdef USE_DOMOTICZ /* #ifdef USE_DOMOTICZ
case FUNC_EVERY_SECOND: case FUNC_EVERY_SECOND:
Vl53l1Every_Second(); Vl53l1Every_Second();
break; break;
#endif // USE_DOMOTICZ #endif // USE_DOMOTICZ */
case FUNC_JSON_APPEND: case FUNC_JSON_APPEND:
Vl53l1Show(1); Vl53l1Show(1);
break; break;