Browse Source

Update 'esp_rc_ctrl/esp_rc_ctrl.ino'

Delay in rc Control removed and set the socket send timeout to two times the message length. The read should be non blocking
klaute 1 year ago
parent
commit
bd368bb39f
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      esp_rc_ctrl/esp_rc_ctrl.ino

+ 3
- 3
esp_rc_ctrl/esp_rc_ctrl.ino View File

@@ -252,7 +252,7 @@ void loop()
252 252
             c = Serial.read();
253 253
             sock.write(c);
254 254
             timeout++;
255
-        } while(c > -1 && timeout < 100);
255
+        } while(c > -1 && timeout < 2*MSG_LENGTH);
256 256
 
257 257
     }
258 258
 
@@ -263,7 +263,7 @@ void loop()
263 263
 
264 264
     digitalWrite(LED_PIN, led_toggle);
265 265
 
266
-    delay(10); // delay to generate a 5Hz loop
266
+    //delay(10); // delay not required
267 267
 }
268 268
 
269
-/*****************************************************************************/
269
+/*****************************************************************************/

Loading…
Cancel
Save