赤子を殺すより楽な作業よv2

Dependencies:   RemoteIR TextLCD

Revision:
9:4ee4fcfd6a5c
Parent:
8:55930d5e00e0
Child:
10:67c7f1c85cdd
--- a/main.cpp	Wed Jul 29 07:46:13 2020 +0000
+++ b/main.cpp	Wed Jul 29 07:53:43 2020 +0000
@@ -230,11 +230,13 @@
                 break;
         }
         pc.printf("                motor\r\n");
+        if(flag_sp > VERYFAST){
+            flag_sp -= 3 * (flag_sp / 3);
         ThisThread::sleep_for(30);
     }
 }
 void changeSpeed(){
-    if(flag_sp == VERYFAST || flag_sp = 5){
+    if(flag_sp%3 == 2){
         flag_sp -= 2;
         
     }else{