runtime optimization
This commit is contained in:
parent
31229594fe
commit
0a1d755154
@ -76,7 +76,5 @@ DS18B20 one wire temp sensor
|
|||||||
|
|
||||||
## Masterplan 2.0
|
## Masterplan 2.0
|
||||||
* Partitionslayout
|
* Partitionslayout
|
||||||
* OW-search address in topic nutzen
|
|
||||||
* Wifi bei timout deaktivieren (damit wir entweder wlan spielen oder fallback: nur pflanzen giessen)
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ void readSensors()
|
|||||||
{
|
{
|
||||||
mPlants[i].addSenseValue();
|
mPlants[i].addSenseValue();
|
||||||
}
|
}
|
||||||
delay(10);
|
delay(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read the distance and give the temperature sensors some time */
|
/* Read the distance and give the temperature sensors some time */
|
||||||
@ -559,9 +559,12 @@ void plantcontrol()
|
|||||||
|
|
||||||
if (lastPumpRunning != -1)
|
if (lastPumpRunning != -1)
|
||||||
{
|
{
|
||||||
//long waterDiff = waterRawSensor.getAverage() - lastWaterValue;
|
long waterDiff = waterRawSensor.getAverage() - lastWaterValue;
|
||||||
//TODO attribute used water in ml to plantid
|
mPlants[lastPumpRunning].setProperty("waterusage").send(String(waterDiff));
|
||||||
|
/* TODO convert diff into volume (milli liter) */
|
||||||
|
Serial << "Plant" << lastPumpRunning << ": Water diff " << waterDiff << " mm" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < MAX_PLANTS; i++)
|
for (int i = 0; i < MAX_PLANTS; i++)
|
||||||
{
|
{
|
||||||
long raw = mPlants[i].getCurrentMoisture();
|
long raw = mPlants[i].getCurrentMoisture();
|
||||||
|
Loading…
Reference in New Issue
Block a user