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

Ignore REST requests when ramping

parent 063a109d
No related branches found
No related tags found
No related merge requests found
Pipeline #166564 passed
......@@ -131,6 +131,10 @@ enum {
};
void sendSNMP() {
if (PINS.ramping) {
restServer.send(403, "text/json", "{\"success\": 0, \"reason\": \"ramping ongoing\"}");
return;
}
uint8_t output = NONE;
uint16_t channel = 0;
bool success = false;
......@@ -178,6 +182,10 @@ void sendSNMP() {
}
void powerGroup() {
if (PINS.ramping) {
restServer.send(403, "text/json", "{\"success\": 0, \"reason\": \"ramping ongoing\"}");
return;
}
String output;
String group;
String ret;
......@@ -224,6 +232,10 @@ void powerGroup() {
}
void powerAllOff() {
if (PINS.ramping) {
restServer.send(403, "text/json", "{\"success\": 0, \"reason\": \"ramping ongoing\"}");
return;
}
String group;
String groups;
bool success = false;
......
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