From 346bae9dbc31c4e7748629a7b2d27791a944b800 Mon Sep 17 00:00:00 2001
From: Cyril Danilevski <cydanil@gmail.com>
Date: Fri, 23 Feb 2024 18:12:37 +0100
Subject: [PATCH] Set and query a channel

---
 rest.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/rest.cpp b/rest.cpp
index 5f4e79d..d1d2efb 100644
--- a/rest.cpp
+++ b/rest.cpp
@@ -84,8 +84,8 @@ void restart() {
 
 
 enum {
-	ON,
 	OFF,
+	ON,
 	NONE,
 };
 
@@ -103,8 +103,7 @@ void sendSNMP() {
 		}
 	}
 
-	auto ipAddr = IPAddress(10, 42, 0 ,1);
-	if (output != NONE) {
+	auto ipAddr = IPAddress(192,168,140,79);
 		SNMP::Message *snmp_msg = mpod.output(output);
 		snmp.send(snmp_msg, ipAddr, SNMP::PORT::SNMP);
 		delete snmp_msg;
@@ -125,7 +124,7 @@ void pollMPODChannel() {
 
 	String http_msg = "{\n";
 	http_msg += ret;
-	http_msg += "\"success\": 1";
+	http_msg += ",\"success\": 1";
 	http_msg += "\n}";
 
 	restServer.send(200, "text/json", http_msg);
-- 
GitLab