Regenerating PPM signal based on distances from ultrasonic sensors, ESP8266 for connectin via wifi. Autonomous quadcopter behaviour, autonomou height holding. Flying direction based on front and back ultrasonic sensors.

Dependencies:   ConfigFile HCSR04 PID PPM2 mbed-rtos mbed

Branch:
DistanceRegulation
Revision:
15:9cdf757269fb
Parent:
14:076ef843e1ba
Child:
21:0afb91824792
--- a/ESP8266/Server.h	Fri Oct 27 14:59:21 2017 +0000
+++ b/ESP8266/Server.h	Fri Oct 27 15:29:51 2017 +0000
@@ -86,6 +86,7 @@
             pc.printf("  Web Characters sent : %d\n\n", bufl);
             pc.printf("  -------------------------------------\n\n");
             servreq=0;
+            memset(_serverMessage, '\0', sizeof(_serverMessage));
         }
         Thread::wait(1000);
     }
@@ -101,6 +102,10 @@
     strcat(webbuff, "Hit Count - ");
     strcat(webbuff, webcount);
     strcat(webbuff, "</div><br /><hr>");
+    //server message (mostly errors)
+    strcat(webbuff, "<div stye=\"text-align:center; background-color:#F4F4F4; color:#00AEDB;\"><h3>Server messages</h3>");
+    strcat(webbuff, _serverMessage);
+    strcat(webbuff, "</div><br><hr>");
     strcat(webbuff, "<p><form method=\"POST\">");
     if(led1==0) {
         strcat(webbuff, "<p><input type=\"radio\" name=\"led1\" value=\"0\" checked>  LED 1 off");