Skip to content
Snippets Groups Projects
Commit 6b2a2143 authored by Cyril Danilevski's avatar Cyril Danilevski :scooter:
Browse files

Set DEPFET M1 channels

parent 42ec1b52
No related branches found
No related tags found
No related merge requests found
......@@ -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));
#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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment