diff --git a/powerproc.cpp b/powerproc.cpp index cb45dae00b39f70a4428e1bfa6b4f127199f6f54..51d1ab6ee5d4ff3c1a44bc88335875abf91a6aa2 100644 --- a/powerproc.cpp +++ b/powerproc.cpp @@ -7,12 +7,16 @@ PowerProcedure::PowerProcedure(const IPAddress& ipAddr) stages = new Stage[stagesCount]; stages[0].name = "ASICS"; - stages[0].size = 4; - stages[0].channels = new int[stages[0].size]{1, 2, 3, 8}; + stages[0].size = 9; + stages[0].channels = new int[stages[0].size]{508, 708, 502, 503, 504, 501, 507, 607, 608}; stages[1].name = "HV"; - stages[1].size = 4; - stages[1].channels = new int[stages[1].size]{4, 5, 6, 7}; + stages[1].size = 10; + stages[1].channels = new int[stages[1].size]{1, 2, 101, 103, 102, 104, 105, 106, 107, 108}; + + stages[2].name = "PLCSOURCE"; + stages[2].size = 9; + stages[2].channels = new int[stages[2].size]{701, 801, 802, 803, 804, 301, 302, 303, 304}; } PowerProcedure::~PowerProcedure() { @@ -84,4 +88,4 @@ bool PowerProcedure::powerOff(const String& stage) { return false; // Invalid group name } -PowerProcedure pproc(IPAddress(192, 168, 140, 79)); +PowerProcedure pproc(IPAddress(192, 168, 140, 106)); diff --git a/powerproc.hpp b/powerproc.hpp index d1ed862a4ea8ff5d8182956739f0823b740ab9b9..e95939f913b862dc1ebe0280083eb171e32ac01a 100644 --- a/powerproc.hpp +++ b/powerproc.hpp @@ -1,22 +1,22 @@ #pragma once #include <Arduino.h> -#define STAGESCOUNT 2 +#define STAGESCOUNT 3 class PowerProcedure { private: String currentStage; // Stores the current stage name int currentChannel; // Stores the current channel - uint8_t stagesCount; // Stores the quantity of power stages struct Stage { String name; // Name of the stage (e.g., "ASICS") int* channels; // Pointer to dynamically allocated channel array size_t size; // Number of channels in the stage }; - Stage* stages; // Array to hold stages public: const IPAddress ipAddr; // Stores the IP address + uint8_t stagesCount; // Stores the quantity of power stages + Stage* stages; // Array to hold stages PowerProcedure(const IPAddress& ipAddr); ~PowerProcedure();