![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
a
Diff: main.h
- Revision:
- 16:829b953d1ac1
- Parent:
- 14:e6d16095ffa8
- Child:
- 17:446be2c278d1
--- a/main.h Mon Sep 23 06:10:11 2019 +0000 +++ b/main.h Mon Sep 23 08:45:17 2019 +0000 @@ -40,38 +40,6 @@ i2c.Out_Set(Out_Data, s+6, color&1<<s)\ /* 型定義 --------------------------------------------------------------------*/ -typedef enum { - test_motor, - test_motor2, - test_motor3, - test_motor4, - test_motor5, - test_motor6, - test_motor7, - test_motor8, - Motor_MAX -} _Motor_; - - -typedef enum { - limit, - limit1, - limit2, - limit3, - limit4, - limit5, - limit6, - limit7, - IN_MAX -} _limit_; -typedef enum { - out1, - out2, - out3, - out4, - ExTowel, - OUT_MAX -} _OUT_; typedef enum { BLACK, @@ -87,7 +55,7 @@ } _COLOR_; -MD_I2C_Data_TypeDef MD_Data[Motor_MAX] = { +MD_I2C_Data_TypeDef MD_Data[] = { { 8, 0, 0, 0, {0}}, //足回り { 9, 1, 0, 0, {0}}, {10, 0, 0, 0, {0}}, @@ -120,33 +88,35 @@ {41,1,0}, // r {41,2,0}, // b; }; - /* 変数宣言 ------------------------------------------------------------------*/ +/* 変数宣言 ------------------------------------------------------------------*/ - /* 関数宣言 ------------------------------------------------------------------*/ +/* 関数宣言 ------------------------------------------------------------------*/ //メカナム基本動作 - void mecanum_Move(int lx, int ly, int rx); +void mecanum_Move(int lx, int ly, int rx); //角度補正 //n_angle: 現在の角度 //t_angle: 目標の角度 - void AngleCorrection(double n_angle, double t_angle); +void AngleCorrection(double n_angle, double t_angle); + +void Toggle(int *variable, int val); - /*クラス宣言-------------------------------------------------------------------*/ - Y_I2C i2c(PB_9, PB_8); // I2C - SBDBT sbdbt(PA_0, PA_1, 9600); // SDBDT - BNO055 bno(PC_9, PA_8); - DigitalOut LED[]= {PA_10,PB_4,PB_5}; - Serial pc(USBTX, USBRX, 115200); +/*クラス宣言-------------------------------------------------------------------*/ +Y_I2C i2c(PB_9, PB_8); // I2C +SBDBT sbdbt(PA_0, PA_1, 9600); // SDBDT +BNO055 bno(PC_9, PA_8); +DigitalOut LED[]= {PA_10,PB_4,PB_5}; +Serial pc(USBTX, USBRX, 115200); //半自動の時に使う - Timer tim; +Timer tim; //角度補正の時に使う - Timer drift_tim; +Timer drift_tim; //上下移動の保持に使う - Timer keep_tim[2]; +Timer keep_tim[2]; #endif /* _MAIN_H_ */ - /******************************** END OF FILE *********************************/ +/******************************** END OF FILE *********************************/