Merge branch 'master' of github.com:0110/PlantCtrl

# Conflicts:
#	esp32/src/main.cpp
This commit is contained in:
Empire 2021-12-03 18:42:37 +00:00
commit b9d8831dea
4 changed files with 7 additions and 8 deletions

View File

@ -24,7 +24,7 @@
* @{
**/
#define NUMBER_TYPE "Number" /**< numberic information, published or read in Homie */
#define NUMBER_TYPE "Float" /**< numberic information, published or read in Homie */
/**
* @name Temperatur Node

View File

@ -12,7 +12,7 @@
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY -fexceptions -lstdc++-exc
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
board_build.partitions = defaultWithSmallerSpiffs.csv

View File

@ -202,9 +202,9 @@ void Plant::setSwitchHandler(HomieInternals::PropertyInputHandler f) {
void Plant::advertise(void)
{
// Advertise topics
mPump = this->mPlant->advertise("switch").setName("Pump").setDatatype("boolean");
this->mPlant->advertise("lastPump").setName("lastPump").setDatatype("Number").setUnit("unixtime");
this->mPlant->advertise("moist").setName("Percent").setDatatype("Number").setUnit("%");
this->mPlant->advertise("moistraw").setName("adc").setDatatype("Number").setUnit("3.3/4096V");
this->mPlant->advertise("state").setName("state").setDatatype("string");
mPump = this->mPlant->advertise("switch").setName("Pump").setDatatype("Boolean");
this->mPlant->advertise("lastPump").setName("lastPump").setDatatype("Integer").setUnit("unixtime");
this->mPlant->advertise("moist").setName("Percent").setDatatype("Float").setUnit("%");
this->mPlant->advertise("moistraw").setName("adc").setDatatype("Float").setUnit("3.3/4096V");
this->mPlant->advertise("state").setName("state").setDatatype("String");
}

View File

@ -660,7 +660,6 @@ void pumpActiveLoop()
void safeSetup()
{
//throw std::runtime_error("Shit happened");
/* reduce power consumption */
setCpuFrequencyMhz(80);