mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-24 19:21:38 +01:00
Feature: Added option to set runtime values to zero when inverter becames unreachable
This commit is contained in:
@@ -111,6 +111,7 @@ bool ConfigurationClass::write()
|
||||
inv["command_enable"] = config.Inverter[i].Command_Enable;
|
||||
inv["command_enable_night"] = config.Inverter[i].Command_Enable_Night;
|
||||
inv["reachable_threshold"] = config.Inverter[i].ReachableThreshold;
|
||||
inv["zero_runtime"] = config.Inverter[i].ZeroRuntimeDataIfUnrechable;
|
||||
|
||||
JsonArray channel = inv.createNestedArray("channel");
|
||||
for (uint8_t c = 0; c < INV_MAX_CHAN_COUNT; c++) {
|
||||
@@ -260,6 +261,7 @@ bool ConfigurationClass::read()
|
||||
config.Inverter[i].Command_Enable = inv["command_enable"] | true;
|
||||
config.Inverter[i].Command_Enable_Night = inv["command_enable_night"] | true;
|
||||
config.Inverter[i].ReachableThreshold = inv["reachable_threshold"] | REACHABLE_THRESHOLD;
|
||||
config.Inverter[i].ZeroRuntimeDataIfUnrechable = inv["zero_runtime"] | false;
|
||||
|
||||
JsonArray channel = inv["channel"];
|
||||
for (uint8_t c = 0; c < INV_MAX_CHAN_COUNT; c++) {
|
||||
|
||||
Reference in New Issue
Block a user