From 476408358a3e3bf56f740dee90eec2a3187f1fe4 Mon Sep 17 00:00:00 2001 From: Balazs Racz Date: Mon, 19 Sep 2022 21:05:07 +0200 Subject: [PATCH] Adds override for default on whether reconnect should be on or off. (#654) --- src/openlcb/ConfiguredTcpConnection.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openlcb/ConfiguredTcpConnection.hxx b/src/openlcb/ConfiguredTcpConnection.hxx index 58cf59a54..c53e03b23 100644 --- a/src/openlcb/ConfiguredTcpConnection.hxx +++ b/src/openlcb/ConfiguredTcpConnection.hxx @@ -118,6 +118,8 @@ public: static constexpr const char *RECONNECT_MAP = "0Disabled" "1Enabled"; + /// Default value for the Reconnect parameter. + static constexpr int RECONNECT_DEFAULT = 1; }; template CDI_GROUP(TcpManualAddress); @@ -149,7 +151,8 @@ CDI_GROUP_ENTRY(auto_address, TcpAutoAddress, Name(LocalParams::AUTO_ADDRESS_NAME), Description(LocalParams::AUTO_ADDRESS_DESCR)); CDI_GROUP_ENTRY(reconnect, Uint8ConfigEntry, Name(LocalParams::RECONNECT_NAME), - Description(LocalParams::RECONNECT_DESCR), Min(0), Max(1), Default(1), + Description(LocalParams::RECONNECT_DESCR), Min(0), Max(1), + Default(LocalParams::RECONNECT_DEFAULT), MapValues(LocalParams::RECONNECT_MAP)); /// Internal storage for the last working address. If the IP address field is /// clear, there is no last known good address.