State machine

Dependencies:   mbed Adafruit_GFX BioroboticsMotorControl MODSERIAL BioroboticsEMGFilter

Revision:
45:f0066593c174
Parent:
44:0056118c01b2
Child:
46:0be634ee10e8
--- a/main.cpp	Thu Nov 01 17:04:41 2018 +0000
+++ b/main.cpp	Thu Nov 01 17:35:58 2018 +0000
@@ -239,7 +239,7 @@
     bool emg_1_state = emg_1.get_is_envelope_over_threshold();
     bool emg_2_state = emg_2.get_is_envelope_over_threshold();
     
-    if (emg_1_state && !last_state_1) {
+    if (emg_1_state) {
         led_green = 0;
 
         if (control_goes_up) {
@@ -252,7 +252,7 @@
         speed_y = 0;
     }
     
-    if (emg_2_state && !last_state_2) {
+    if (emg_2_state) {
         led_blue = 0;
         if (control_goes_right) {
             speed_x = max_speed;