NHK 2019 manual program 11_18(送風シーケンスバグ解決ver)

Dependencies:   mbed PS3_10_26

Revision:
8:959fe4717597
Parent:
7:c423a6579c3c
--- a/main.cpp	Wed Oct 30 09:18:08 2019 +0000
+++ b/main.cpp	Mon Nov 18 06:18:13 2019 +0000
@@ -96,6 +96,7 @@
 bool y=0;
 bool kaisyu_arm=0;
 char get_data_ps3[8];
+bool flug_servo=0;
 
 
 
@@ -337,7 +338,7 @@
                 led=0;
                 stop=1;
                 j=0;
-                data_sound=0x51;
+                data_sound=0x41;
                 send_data(0x36,data_sound);
             } else if(j==0) {
                 //緊急停止解除
@@ -744,6 +745,10 @@
             old_square=square;
             if(square==1){
                 if(x==0){
+                    /*
+                    data_servo=0x02;
+                    send_data(0x18,data_servo);
+                    */
                     p=1;
                     x=1;
                     timer2.start();
@@ -946,6 +951,8 @@
                 send_data(0x24,data7);
                 r=6;
             }
+            data_servo=0x10;
+            send_data(0x18,data_servo);
             break;
             
             default:
@@ -972,6 +979,14 @@
     }else if(left2==0&&(old_triangle!=triangle)&&select==0&&(get_data_rs232 & 0b00000011)){
         old_triangle=triangle;
         if(triangle==1){
+            if(!flug_servo){
+                data_servo=0xf4;
+                send_data(0x18,data_servo);
+                data10=0xff;
+                send_data(0x40,data10);
+                wait(2);
+                flug_servo=1;
+            }
             data8=0xff;
             data9=0xff;
             data10=0xff;