2022_Ateam_MOTORprogramをscrp_slaveでメインマイコンからコントローラー状況を読み取れるように改良。 また、モータに0以外のpwmが送られている場合に基盤付属のledが点灯するようにした。

Dependencies:   SBDBT arrc_mbed BNO055

Revision:
9:569c0f55dd9b
Parent:
5:1a850f68a06c
Child:
10:ad8fced7d6b6
--- a/library/function.hpp	Sat Jan 29 14:47:48 2022 +0000
+++ b/library/function.hpp	Thu Feb 03 13:07:37 2022 +0000
@@ -10,6 +10,7 @@
 int r2_num;
 bool up;
 bool down;
+bool l1;
 
 //スティックのx成分取得
 bool getLstick_x(int rx_data,int &tx_data){
@@ -38,9 +39,7 @@
 
 //自動、手動モード切り替え
 bool change_mode(int rx_data,int &tx_data){
-    if(rx_data == 1){
-        auto_mode =! auto_mode;
-    }
+    auto_mode = rx_data;
     return true;
 }
 
@@ -56,11 +55,9 @@
      return true;
 }
 
-//四角キー取得
-
-//三角キー取得
-
-//丸キー取得
-
-//Xキー取得
+//L1取得
+bool getL1(int rx_data,int &tx_data){
+    l1 = rx_data;
+    return true;
+}
 #endif
\ No newline at end of file