From d8c335b6dac97044a7f36d1aabe4c28db052383b Mon Sep 17 00:00:00 2001 From: Xiretza Date: Sun, 14 Aug 2022 18:16:37 +0200 Subject: [PATCH] buttons: move to spaceapi.it-syndikat.org domain --- ITS_Open_direct_2fb/ITS_Open_direct_2fb.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ITS_Open_direct_2fb/ITS_Open_direct_2fb.ino b/ITS_Open_direct_2fb/ITS_Open_direct_2fb.ino index eb7c291..2df157d 100644 --- a/ITS_Open_direct_2fb/ITS_Open_direct_2fb.ino +++ b/ITS_Open_direct_2fb/ITS_Open_direct_2fb.ino @@ -25,7 +25,7 @@ byte mac[] = { 0xD4, 0xBA, 0xD9, 0x9A, 0x7C, 0x95 }; // Must be unique on local EthernetClient client; // Twitter response variables -char serverName[] = "it-syndikat.org"; // URL +#define SERVER_DOMAIN "spaceapi.it-syndikat.org" // URL String currentLine = ""; // string to hold the text from server // Specific variables @@ -279,11 +279,11 @@ void readServerStatus(int mode) { void TriggerServerReq(String s, int mode) { // attempt to connect, and wait a millisecond: if(debug){Serial.println("connecting to server... Status req");} - if (client.connect(serverName, 80)) { + if (client.connect(SERVER_DOMAIN, 80)) { if(debug){Serial.println("making HTTP request...");} // make HTTP GET request to server: client.println("GET "+ s +" HTTP/1.1"); - client.println("HOST: it-syndikat.org"); + client.println("HOST: " SERVER_DOMAIN); client.println("Connection: close"); client.println(); readServerStatus(mode); @@ -335,12 +335,12 @@ void setup() void TriggerServerUpdate(boolean stat) { // attempt to connect, and wait a millisecond: if(debug){Serial.println("connecting to server... Update Req");} - if (client.connect(serverName, 80)) { + if (client.connect(SERVER_DOMAIN, 80)) { if(debug){Serial.println("making HTTP request...");} // make HTTP GET request to server: String s =(stat?"true":"false"); client.println("GET /api/update.php?open=" + s + "&apikey="+serverAPIKey+" HTTP/1.1"); - client.println("HOST: it-syndikat.org"); + client.println("HOST: " SERVER_DOMAIN); client.println("Connection: close"); client.println(); readServerStatus(0);