Serial debug added for 1wire initialization
This commit is contained in:
parent
1190b0324e
commit
9435bf8392
@ -127,7 +127,7 @@
|
||||
|
||||
#define FIRMWARE_BASENAME "PlantControl"
|
||||
#define FIRMWARE_NAME FIRMWARE_BASENAME FIRMWARE_FEATURE1 FIRMWARE_FEATURE2
|
||||
#define FIRMWARE_VERSIONNMUMBER "3.020"
|
||||
#define FIRMWARE_VERSIONNMUMBER "3.021"
|
||||
|
||||
#ifdef HWREVISION07
|
||||
#define FIRMWARE_VERSION FIRMWARE_VERSIONNMUMBER " HW0.7"
|
||||
@ -168,8 +168,8 @@
|
||||
#define MAX_CONFIG_SETTING_ITEMS 100 /**< Parameter, that can be configured in Homie */
|
||||
#define MAX_JSON_CONFIG_FILE_SIZE_CUSTOM 2500
|
||||
|
||||
#define TEMPERATUR_TIMEOUT 3000 /**< 3 Seconds timeout for the temperatures sensors */
|
||||
#define WATERSENSOR_TIMEOUT 3000 /**< 3 Seconds timeout for the water distance sensor */
|
||||
#define TEMPERATUR_TIMEOUT 5000 /**< 5 Seconds timeout for the temperatures sensors */
|
||||
#define WATERSENSOR_TIMEOUT 1000 /**< 1 Seconds timeout for the water distance sensor */
|
||||
#define WATERSENSOR_CYCLE 10 /**< 10 sensor measurement are performed */
|
||||
#define DS18B20_RESOLUTION 9 /**< 9bit temperature resolution -> 0.5°C steps */
|
||||
|
||||
|
@ -837,12 +837,18 @@ void safeSetup()
|
||||
uint8_t sensorCount = 0U;
|
||||
|
||||
/* Required to read the temperature at least once */
|
||||
while ((sensorCount == 0 || !battery.isFound()) && millis() < tempInitStartTime + TEMPERATUR_TIMEOUT)
|
||||
for(int i=0;
|
||||
((sensorCount == 0 || !battery.isFound()) && millis() < tempInitStartTime + TEMPERATUR_TIMEOUT);
|
||||
i++)
|
||||
{
|
||||
sensors.begin();
|
||||
battery.begin();
|
||||
sensorCount = sensors.getDS18Count();
|
||||
delay(50);
|
||||
if (i > 1)
|
||||
{
|
||||
Serial << "DS18S20 count: " << sensorCount << ", battery is found: " << battery.isFound() << " ( loop: " << i << " )" << endl;
|
||||
}
|
||||
delay(100);
|
||||
}
|
||||
|
||||
readOneWireSensors();
|
||||
|
Loading…
x
Reference in New Issue
Block a user