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

Check target voltage and target current on channel poll

parent 4f3c386d
No related branches found
No related tags found
1 merge request!3DEPFET Q2M1 Power Procedure
Pipeline #165017 passed
This commit is part of merge request !3. Comments created here will be created in the context of that merge request.
...@@ -23,6 +23,10 @@ SNMP::Message *MPOD::read(uint16_t channel) { ...@@ -23,6 +23,10 @@ SNMP::Message *MPOD::read(uint16_t channel) {
snmp_cmd += channel; snmp_cmd += channel;
message->add(snmp_cmd.c_str()); message->add(snmp_cmd.c_str());
snmp_cmd = OID::NAMES[OID::OUTPUTVOLTAGE];
snmp_cmd += channel;
message->add(snmp_cmd.c_str());
snmp_cmd = OID::NAMES[OID::OUTPUTMEASUREMENTSENSEVOLTAGE]; snmp_cmd = OID::NAMES[OID::OUTPUTMEASUREMENTSENSEVOLTAGE];
snmp_cmd += channel; snmp_cmd += channel;
message->add(snmp_cmd.c_str()); message->add(snmp_cmd.c_str());
...@@ -31,6 +35,10 @@ SNMP::Message *MPOD::read(uint16_t channel) { ...@@ -31,6 +35,10 @@ SNMP::Message *MPOD::read(uint16_t channel) {
snmp_cmd += channel; snmp_cmd += channel;
message->add(snmp_cmd.c_str()); message->add(snmp_cmd.c_str());
snmp_cmd = OID::NAMES[OID::OUTPUTCURRENT];
snmp_cmd += channel;
message->add(snmp_cmd.c_str());
return message; return message;
} }
...@@ -202,9 +210,6 @@ void initializeSNMP() { ...@@ -202,9 +210,6 @@ void initializeSNMP() {
Serial.println("SNMP Server Started"); Serial.println("SNMP Server Started");
} }
/* setChannelAndWait
* Set a channel's parameters and wait until it's settled.
*/
void setChannelStateAndWait(const IPAddress *ipAddr, const uint16_t channel, const uint8_t output) { void setChannelStateAndWait(const IPAddress *ipAddr, const uint16_t channel, const uint8_t output) {
// Send set command // Send set command
SNMP::Message *snmp_msg = mpod.setChannelState(channel, output); SNMP::Message *snmp_msg = mpod.setChannelState(channel, output);
...@@ -244,6 +249,5 @@ void setChannelVoltageAndWait(const IPAddress *ipAddr, const uint16_t channel, ...@@ -244,6 +249,5 @@ void setChannelVoltageAndWait(const IPAddress *ipAddr, const uint16_t channel,
delete snmp_msg; delete snmp_msg;
delay(MPOD_UPDATE_LATENCY); delay(MPOD_UPDATE_LATENCY);
snmp.loop(); snmp.loop();
} while (mpod.isRampingDown() || } while (mpod.isRampingDown() || mpod.isRampingUp());
mpod.isRampingUp()); // TODO check applied voltage close to target voltage
} }
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