:Merge branch 'master' of https://github.com/0110/PlantCtrl into master
This commit is contained in:
commit
902b81ab3e
@ -11,7 +11,7 @@
|
||||
#ifndef CONTROLLER_CONFIG_H
|
||||
#define CONTROLLER_CONFIG_H
|
||||
|
||||
#define FIRMWARE_VERSION "1.0.6"
|
||||
#define FIRMWARE_VERSION "1.0.7"
|
||||
|
||||
#define ADC_TO_VOLT(adc) ((adc) * 3.3 ) / 4095)
|
||||
#define ADC_TO_VOLT_WITH_MULTI(adc, multi) (((adc) * 3.3 * (multi)) / 4095)
|
||||
|
@ -37,8 +37,8 @@ HomieNode stayAlive("stay", "alive", "alive");
|
||||
/**
|
||||
*********************************** Settings *******************************
|
||||
*/
|
||||
HomieSetting<long> deepSleepTime("deepsleep", "time in milliseconds to sleep (0 deactivats it)");
|
||||
HomieSetting<long> deepSleepNightTime("nightsleep", "time in milliseconds to sleep (0 uses same setting: deepsleep at night, too)");
|
||||
HomieSetting<long> deepSleepTime("deepsleep", "time in seconds to sleep (0 deactivats it)");
|
||||
HomieSetting<long> deepSleepNightTime("nightsleep", "time in seconds to sleep (0 uses same setting: deepsleep at night, too)");
|
||||
HomieSetting<long> wateringDeepSleep("pumpdeepsleep", "time seconds to sleep, while a pump is running");
|
||||
|
||||
HomieSetting<long> waterLevelMax("watermaxlevel", "distance (mm) at maximum water level");
|
||||
|
@ -488,8 +488,8 @@ void systemInit(){
|
||||
// Set default values
|
||||
|
||||
//in seconds
|
||||
deepSleepTime.setDefaultValue(10);
|
||||
deepSleepNightTime.setDefaultValue(30);
|
||||
deepSleepTime.setDefaultValue(60);
|
||||
deepSleepNightTime.setDefaultValue(600);
|
||||
wateringDeepSleep.setDefaultValue(5);
|
||||
|
||||
/* waterLevelMax 1000 */ /* 100cm in mm */
|
||||
@ -540,12 +540,9 @@ void systemInit(){
|
||||
|
||||
|
||||
bool mode1(){
|
||||
Serial.println("m1");
|
||||
Serial.println("==== Mode 1 ====");
|
||||
Serial << getCurrentTime() << " curtime" << endl;
|
||||
|
||||
/* Disable all sleeping stuff before reading sensors */
|
||||
gpio_deep_sleep_hold_dis();
|
||||
|
||||
readSensors();
|
||||
//queue sensor values for
|
||||
|
||||
@ -586,7 +583,7 @@ bool mode1(){
|
||||
}
|
||||
|
||||
void mode2(){
|
||||
Serial.println("m2");
|
||||
Serial.println("==== Mode 2 ====");
|
||||
systemInit();
|
||||
|
||||
/* Jump into Mode 3, if not configured */
|
||||
|
Loading…
Reference in New Issue
Block a user