Skip to content
Snippets Groups Projects
Verified Commit 30e6eb2e authored by Zoe Michaela Dietmar Pfister's avatar Zoe Michaela Dietmar Pfister :gay_pride_flag:
Browse files

Fix build of client satellite

parent 33e0483b
No related branches found
No related tags found
2 merge requests!39Merge Develop into Main,!30Renamed Sentec Sensors, made RS485 serial connection a singleton shared...
Pipeline #102072 passed
......@@ -37,7 +37,7 @@ LC709203F battery_monitor;
#define POWER_SWITCH_PIN_12V 12
#define POWER_SWITCH_PIN_5V 13
Forte_RS485 rs485;
ForteRS485 rs485;
SEM404 rainGaugeSensor{2, RE_DE_PIN};
ForteDR26 dr26_channel0;
......@@ -87,9 +87,9 @@ void setup() {
// auto messages2 = dr26_channel2.buildMessages();
// auto messages3 = dr26_channel3.buildMessages();
// auto messages4 = battery_monitor.buildMessages();
Forte_RS485::powerOnRS485Sensors();
ForteRS485::powerOnRS485Sensors();
auto soilMessage = rainGaugeSensor.buildMessages();
Forte_RS485::powerOffRS485Sensors();
ForteRS485::powerOffRS485Sensors();
// roughly takes 500ms, ~120ms for each adc channel, barely anything for battery monitor
ESP_LOGD(TAG, "Reading data and building messages took %ld ms", millis() - ts);
gpio_set_level(GPIO_NUM_32, 0);
......@@ -105,7 +105,7 @@ void setup() {
ESP_LOGD(TAG, "EPSNow setup took %ld ms", millis() - ts);
if (messages.back().getClientDataPackage().getMeasurementData().getValue() > 20) {
Forte_RS485::powerOnRS485Sensors();
ForteRS485::powerOnRS485Sensors();
if (rainGaugeSensor.resetPrecipitation() == ErrorType::SEM404_COULD_NOT_RESET_PRECIPITATION) {
ESP_LOGE(TAG, "Could not reset precipitation");
auto precipitationErrorMessage = Message(
......@@ -117,7 +117,7 @@ void setup() {
Message::nullMessage(), Message::nullMessage()};
Message::sendMessages(messages_error);
}
Forte_RS485::powerOffRS485Sensors();
ForteRS485::powerOffRS485Sensors();
}
ts = millis();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment