From 415194c81fe73ead3d124cdf4126080bb392c71a Mon Sep 17 00:00:00 2001 From: Emmanuel HC Date: Thu, 2 Oct 2025 09:58:40 -0500 Subject: [PATCH] Eaton ATS fixed --- platformio.ini | 2 +- .../ATS/ATS_Eaton_ATC900_RPD_TCP/State_Running.cpp | 10 +++++----- .../ATS/ATS_Eaton_ATC900_RPD_TCP/State_Standby.cpp | 10 +++++----- src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/config.h | 12 ++++++------ 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/platformio.ini b/platformio.ini index baae18e..2cefd69 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -default_envs = ATS_Woodward_DTSC200A_TCP ; Select here the name of the configuration you want to download +default_envs = ATS_Eaton_ATC900_RPD_TCP ; Select here the name of the configuration you want to download [env] upload_port = COM15 diff --git a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Running.cpp b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Running.cpp index 6e5d29d..1045e37 100644 --- a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Running.cpp +++ b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Running.cpp @@ -41,10 +41,10 @@ RunningState::RunningState() { addStrategy("Source 1 Volts AB", new SingleValueStrategy(0.0F, 0.0f, 1000)); addStrategy("Source 1 Volts BC", new SingleValueStrategy(0.0F, 0.0f, 1000)); - addStrategy("Source 1 Volts AC", new SingleValueStrategy(0.0F, 0.0f, 1000)); + addStrategy("Source 1 Volts CA", new SingleValueStrategy(0.0F, 0.0f, 1000)); addStrategy("Source 2 Volts AB", new SingleValueStrategy(480.0F, 2.0f, 1000)); addStrategy("Source 2 Volts BC", new SingleValueStrategy(480.0F, 2.0f, 1000)); - addStrategy("Source 2 Volts AC", new SingleValueStrategy(480.0F, 2.0f, 1000)); + addStrategy("Source 2 Volts CA", new SingleValueStrategy(480.0F, 2.0f, 1000)); addStrategy("Source 1 Frequency", new SingleValueStrategy(0.0f, 0.0f, 1000)); addStrategy("Source 2 Frequency", new SingleValueStrategy(60.0f, 1.0f, 1000)); @@ -83,9 +83,9 @@ State* RunningState::update(Equipment* equipment) float load = static_cast(I_load); float rating = static_cast(I_rating); float real_load = rating * (load/100.0f); - Strategy_Behavior* ampsA_svs = getStrategy("S2 Amps A"); - Strategy_Behavior* ampsB_svs = getStrategy("S2 Amps B"); - Strategy_Behavior* ampsC_svs = getStrategy("S2 Amps C"); + Strategy_Behavior* ampsA_svs = getStrategy("Amps A"); + Strategy_Behavior* ampsB_svs = getStrategy("Amps B"); + Strategy_Behavior* ampsC_svs = getStrategy("Amps C"); static_cast(ampsA_svs)->setSetpoint(real_load); static_cast(ampsB_svs)->setSetpoint(real_load); diff --git a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Standby.cpp b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Standby.cpp index 4b02da1..be9fef9 100644 --- a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Standby.cpp +++ b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Standby.cpp @@ -40,10 +40,10 @@ StandbyState::StandbyState() { // You can add initialization code here if needed addStrategy("Source 1 Volts AB", new SingleValueStrategy(480.0F, 2.0f, 1000)); addStrategy("Source 1 Volts BC", new SingleValueStrategy(480.0F, 2.0f, 1000)); - addStrategy("Source 1 Volts AC", new SingleValueStrategy(480.0F, 2.0f, 1000)); + addStrategy("Source 1 Volts CA", new SingleValueStrategy(480.0F, 2.0f, 1000)); addStrategy("Source 2 Volts AB", new SingleValueStrategy(0.0F, 0.0f, 1000)); addStrategy("Source 2 Volts BC", new SingleValueStrategy(0.0F, 0.0f, 1000)); - addStrategy("Source 2 Volts AC", new SingleValueStrategy(0.0F, 0.0f, 1000)); + addStrategy("Source 2 Volts CA", new SingleValueStrategy(0.0F, 0.0f, 1000)); addStrategy("Source 1 Frequency", new SingleValueStrategy(60.0f, 1.0f, 1000)); addStrategy("Source 2 Frequency", new SingleValueStrategy(0.0f, 0.0f, 1000)); @@ -78,9 +78,9 @@ State* StandbyState::update(Equipment* equipment) float load = static_cast(I_load); float rating = static_cast(I_rating); float real_load = rating * (load/100.0f); - Strategy_Behavior* ampsA_svs = getStrategy("S1 Amps A"); - Strategy_Behavior* ampsB_svs = getStrategy("S1 Amps B"); - Strategy_Behavior* ampsC_svs = getStrategy("S1 Amps C"); + Strategy_Behavior* ampsA_svs = getStrategy("Amps A"); + Strategy_Behavior* ampsB_svs = getStrategy("Amps B"); + Strategy_Behavior* ampsC_svs = getStrategy("Amps C"); static_cast(ampsA_svs)->setSetpoint(real_load); static_cast(ampsB_svs)->setSetpoint(real_load); diff --git a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/config.h b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/config.h index b75f77b..a54911d 100644 --- a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/config.h +++ b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/config.h @@ -21,10 +21,10 @@ * @{ */ #include - const char *ssid = "QTS_CDR_Arduino"; /**< @brief The SSID of the WiFi network. */ - const char *password = "123abc456"; /**< @brief The password for the WiFi network. */ - IPAddress local_IP(172, 17, 30, 241); /**< @brief The static IP address for the device. */ - IPAddress gateway(172, 17, 30, 1); /**< @brief The gateway IP address. */ + const char *ssid = "esrlok_portable"; /**< @brief The SSID of the WiFi network. */ + const char *password = "m7g6eNMe?cy8S@z"; /**< @brief The password for the WiFi network. */ + IPAddress local_IP(192, 168, 1, 15); /**< @brief The static IP address for the device. */ + IPAddress gateway(192, 168, 1, 1); /**< @brief The gateway IP address. */ IPAddress subnet(255, 255, 255, 0); /**< @brief The subnet mask. */ ModbusIP mb; @@ -62,8 +62,8 @@ modbusMap mb_map[] = { {HR, 9, 0, "ATS_Source"}, //Internal to control from Modscan {HR, 10, 0, "ATS_Load"}, //Internal Fault code from Modscan - {HR, 11, 0, "ATS_Input"}, //Internal Fault code from Modscan - {HR, 12, 0, "ATS_Fault"}, //Internal Fault code from Modscan + {HR, 11, 0, "ATS_Rating"}, //Internal Fault code from Modscan + {HR, 12, 0, "ATS_Input"}, //Internal Fault code from Modscan {DI, 999, 0, "Source 1 Available"}, {DI, 1000, 0, "Source 2 Available"}, {DI, 1001, 0, "Source 1 Active"},