test4

Dependencies:   mbed BufferedSerial LS7366LIB2 FastPWM

Revision:
4:bf278ddb8504
Parent:
2:14b52dee1c35
--- a/pc_serial.h	Tue Jul 28 01:42:16 2020 +0000
+++ b/pc_serial.h	Tue Dec 08 01:25:06 2020 +0000
@@ -9,7 +9,7 @@
 
 char check_pitch[6];
 char rx_buffer[100]={0,};
-char command[100]={0,};
+char command[100]="Start32768,32768,32768,32768,32768,32768\n";
 char tx_buffer[100]="txdat32768,32768,32768,32768,32768,32768\n";
 int tx_index = 0;
 int rx_index = 0;
@@ -21,7 +21,19 @@
 
 double set_data[100] = {0x00, }; 
 
-unsigned int cmd_roll, cmd_pitch, cmd_heave, cmd_sway, cmd_surge, cmd_yaw;
+unsigned int cmd_roll=32768;
+unsigned int cmd_pitch=32768;
+unsigned int cmd_heave=32768;
+unsigned int cmd_sway=32768;
+unsigned int cmd_surge=32768;
+unsigned int cmd_yaw=32768;
+
+unsigned int A_ex_cmd_roll=32768;
+unsigned int A_ex_cmd_pitch=32768;
+unsigned int A_ex_cmd_heave=32768;
+unsigned int A_ex_cmd_sway=32768;
+unsigned int A_ex_cmd_surge=32768;
+unsigned int A_ex_cmd_yaw=32768;
 
 void Start_Command();
 void Set_Arrangement();
@@ -104,7 +116,6 @@
                 temp=temp*10+command[i]-0x30;
         }
         
- 
         cmd_roll     =  data1;
         cmd_pitch    =  data2;
         cmd_heave    =  data3;
@@ -112,6 +123,9 @@
         cmd_surge    =  data5;
         cmd_yaw      =  data6;
         
+        idle_check(cmd_roll,cmd_pitch,cmd_heave,cmd_sway,cmd_surge,cmd_yaw);
+        
+        
         /*
         pc.printf("%d,",cmd_roll);
         pc.printf("%d,",cmd_pitch);