Exceptions added
This commit is contained in:
parent
f727971138
commit
66d69eab6b
@ -85,9 +85,9 @@
|
|||||||
#define FIRMWARE_VERSION "sw 2.0 hw 0.10b"
|
#define FIRMWARE_VERSION "sw 2.0 hw 0.10b"
|
||||||
|
|
||||||
#define TIMED_LIGHT_PIN CUSTOM1_PIN5
|
#define TIMED_LIGHT_PIN CUSTOM1_PIN5
|
||||||
//#define FLOWMETER_PIN CUSTOM1_PIN1
|
#define FLOWMETER_PIN CUSTOM1_PIN1
|
||||||
#ifdef FLOWMETER_PIN
|
#ifdef FLOWMETER_PIN
|
||||||
#define FLOWMETER_FLOWFACTOR 22 /** F = 22 * Q;Q = L/min */
|
#define FLOWMETER_FLOWFACTOR 23 /** F = 22 * Q;Q = L/min */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MOIST_SENSOR_MAX_FRQ 60000 // 60kHz (500Hz margin)
|
#define MOIST_SENSOR_MAX_FRQ 60000 // 60kHz (500Hz margin)
|
||||||
|
@ -12,9 +12,10 @@
|
|||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = esp32doit-devkit-v1
|
board = esp32doit-devkit-v1
|
||||||
framework = arduino
|
framework = arduino
|
||||||
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY -fexceptions -lstdc++-exc
|
||||||
board_build.partitions = defaultWithSmallerSpiffs.csv
|
board_build.partitions = defaultWithSmallerSpiffs.csv
|
||||||
|
|
||||||
|
|
||||||
; the latest development brankitchen-lightch (convention V3.0.x)
|
; the latest development brankitchen-lightch (convention V3.0.x)
|
||||||
lib_deps = ArduinoJson@6.16.1
|
lib_deps = ArduinoJson@6.16.1
|
||||||
OneWire
|
OneWire
|
||||||
|
@ -639,12 +639,9 @@ void pumpActiveLoop()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
void safeSetup()
|
||||||
* @brief Startup function
|
|
||||||
* Is called once, the controller is started
|
|
||||||
*/
|
|
||||||
void setup()
|
|
||||||
{
|
{
|
||||||
|
throw std::runtime_error("Shit happened");
|
||||||
/* reduce power consumption */
|
/* reduce power consumption */
|
||||||
setCpuFrequencyMhz(80);
|
setCpuFrequencyMhz(80);
|
||||||
|
|
||||||
@ -829,6 +826,26 @@ void setup()
|
|||||||
setupFinishedTimestamp = millis();
|
setupFinishedTimestamp = millis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Startup function
|
||||||
|
* Is called once, the controller is started
|
||||||
|
*/
|
||||||
|
void setup()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
safeSetup();
|
||||||
|
}
|
||||||
|
catch (const std::exception &e)
|
||||||
|
{
|
||||||
|
Serial.printf("Exception thrown: \"%s\"", e.what());
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
Serial.println("Other exception thrown.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void selfTest()
|
void selfTest()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user