UI library

Dependents:   201_test-UI 200_yotsuba_21

Revision:
1:ed6249618fd3
Parent:
0:2623196cd444
Child:
2:a5e8e6156172
--- a/ui.h	Tue Jan 19 09:24:37 2021 +0000
+++ b/ui.h	Wed Mar 03 11:49:25 2021 +0000
@@ -2,8 +2,8 @@
 #define UI_H
 
 #include "mbed.h"
-#include "pin_config.h"
 #include "aqm0802.h"
+#include "beep.h"
 
 class UI
 {
@@ -12,31 +12,51 @@
     
     /*
     ボタン推すとかわる各変数の演算だよ
+    displayに入れてね
     */
-    void button();
+    void updatebt();
     
     /*
+    表示変更用の関数だよ
     valname    3文字までしか入れちゃだめだよ
     dispvaleu  3桁までしか表示しないよ
     */
-    void display(char valname1, char valname2, double* dispvalue);
+    void change(char *valname1, char *valname2, double *dispvalue);
+    
+    /*
+    ループ入るよ
+    changeで各種表示用パラメータを変更してね
+    */
+    void display();
+    
+    /*
+    テスト用
+    nameを返す用の関数
+    */
+    void returnchar(char *buf);
     
     /*
     mainに入れよう
     */
-    uint8_t team, algorithm, displayst;
+    uint8_t team, algorithm, displayst, start;
     /*
     team      -> 0:yellow  1:blue
     algorithm -> 0:offence  1:deffence  2:kicktest  3:displayonly  4:display & omuni
+     アルゴリズムは今はオフェンスディフェンスだけにする
     displayst -> 0:gyro & ballangle  1:goalangle  2:motor0,1  3:motor2,3
     */
+    
 private :
-    Thread UIthread;
-    
+    Thread    UIthread;
+    Thread    buzzthread;
     aqm0802   lcd;
-    DigitalIn b0;//チーム
-    DigitalIn b1;//アルゴリズム
-    DigitalIn b2;//ディスプレイ
+    AnalogIn  b0_;
+    DigitalIn tgl1, tgl2, tgl3;
+    Beep      buzz;
     
-    bool b0_, b1_, b2_;//各ボタンの最後の状況
-};
\ No newline at end of file
+    char *name1, *name2;
+    double dispvalue[2];
+    uint8_t b[4], b_[4], st[4], b0, mode;
+    
+};
+#endif
\ No newline at end of file