From 6b2a214350e8baaeb72178239652a8a14685f14d Mon Sep 17 00:00:00 2001 From: Cyril Danilevski <cyril.danilevski@xfel.eu> Date: Wed, 12 Feb 2025 15:46:14 +0100 Subject: [PATCH] Set DEPFET M1 channels --- powerproc.cpp | 14 +++++++++----- powerproc.hpp | 6 +++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/powerproc.cpp b/powerproc.cpp index cb45dae..51d1ab6 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 d1ed862..e95939f 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(); -- GitLab