         serial_byte_count = 0;
         payload_state = 2;
         rx_payload.unserialize(input_string);
-//        Serial.println();
-//        Serial.print(rx_payload.getDeviceId()); Serial.print(", ");
-//        Serial.print(rx_payload.getMsgId()); Serial.print(", ");
-//        Serial.print(rx_payload.getA()); Serial.print(", ");
-//        Serial.print(rx_payload.getB()); Serial.print(", ");
-//        Serial.print(rx_payload.getC()); Serial.print(", ");
-//        Serial.print(rx_payload.getD()); Serial.print(", ");
-//        Serial.print(rx_payload.getE()); Serial.print(", ");
-//        Serial.println(rx_payload.getF());
-        
       }
     } else {
       // Passthru other serial messages.
       //Serial.print(char(in));
       
-    }
-  }
-
-  uint8_t i;
-  // check if there are any new TCP clients
-  if (server.hasClient()) {
-    uint8_t allocated = 0;
-    for (i = 0; i < MAX_SRV_CLIENTS; i++) {
-      if (allocated == 0) {
-        //find free/disconnected spot
-        if (!serverClients[i] || !serverClients[i].connected()) {
-          if (serverClients[i]) {
-            serverClients[i].stop();
-          }
-          serverClients[i] = server.available();
-          serverClients[i].setNoDelay(true);
-          serverClients[i].setTimeout(100);
-          Serial.print("New client: "); Serial.println(i);
-          allocated = 1;
-        }
-      }
-    }
-    //no free/disconnected spot so reject
-    WiFiClient serverClient = server.available();
-    serverClient.stop();
-  }
-  
-  // check clients for data
-  for (i = 0; i < MAX_SRV_CLIENTS; i++) {
-    if (serverClients[i] && serverClients[i].connected()) {
-      if (serverClients[i].available()) {
-        // Ignore client input
-        serverClients[i].flush();
-      }
     }
   }
 


const long ping_interval = 3000;
unsigned long ping_last = 0;
uint8_t ping_msg_id = 0;

void setup() {
  Serial.begin(115200);



#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include "config.h"
#include "SSD1306.h"
#include "Payload.h"


// A UDP instance to let us send and receive packets over UDP
WiFiUDP Udp;

// Multicast declarations
IPAddress ipMulti(239, 0, 0, 57);
unsigned int portMulti = 12345;      // local port to listen on


// Initialize the OLED display using Wire library
SSD1306  display(0x3c, 4, 5);

Payload rx_payload = Payload();
uint8_t input_string[Payload_SIZE];
uint8_t payload_state = 0;
uint8_t serial_byte_count = 0;
