More serial debuging (parsing 1WIRE Addresses failed)

This commit is contained in:
Ollo 2023-05-27 09:12:55 +02:00
parent e55b4abd49
commit ab17709435

View File

@ -373,6 +373,7 @@ void readPowerSwitchedSensors()
tankSensor.setAddress(0x52); tankSensor.setAddress(0x52);
tankSensor.setBus(&Wire); tankSensor.setBus(&Wire);
delay(50); delay(50);
Serial << "Distance sensor init" << endl;
long start = millis(); long start = millis();
bool distanceReady = false; bool distanceReady = false;
while ((start + WATERSENSOR_TIMEOUT) > millis()) while ((start + WATERSENSOR_TIMEOUT) > millis())
@ -395,6 +396,7 @@ void readPowerSwitchedSensors()
tankSensor.setVcselPulsePeriod(VL53L0X::VcselPeriodPreRange, 18); tankSensor.setVcselPulsePeriod(VL53L0X::VcselPeriodPreRange, 18);
tankSensor.setVcselPulsePeriod(VL53L0X::VcselPeriodFinalRange, 14); tankSensor.setVcselPulsePeriod(VL53L0X::VcselPeriodFinalRange, 14);
tankSensor.setMeasurementTimingBudget(200000); tankSensor.setMeasurementTimingBudget(200000);
Serial << "Distance sensor measuring" << endl;
for (int readCnt = 0; readCnt < WATERSENSOR_CYCLE; readCnt++) for (int readCnt = 0; readCnt < WATERSENSOR_CYCLE; readCnt++)
{ {
@ -847,7 +849,7 @@ void safeSetup()
mPlants[i].initSensors(); mPlants[i].initSensors();
} }
readPowerSwitchedSensors(); readPowerSwitchedSensors();
Serial << "Reading Homie Config..." << endl;
Homie.setup(); Homie.setup();