ALPHA_A
Dependencies: DataPool MD_PID mbed
Diff: 2017_4/2017_4.h
- Revision:
- 0:e77e7d7bbae0
- Child:
- 4:169a7b6c0138
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/2017_4/2017_4.h Wed Aug 30 05:23:13 2017 +0000 @@ -0,0 +1,24 @@ +#ifndef _Mekanamu_4_H_ +#define _Mekanamu_4_H_ +#include "mbed.h" +#include "MD.h" +#include "MD_PID.h" + +class Mekanamu_4{ +public: + Mekanamu_4(PinName pin_pwm_FR, PinName pin_dere_FR, PinName pin_channelA_FR, PinName pin_channelB_FR, + PinName pin_pwm_FL, PinName pin_dere_FL, PinName pin_channelA_FL, PinName pin_channelB_FL, + PinName pin_pwm_BL, PinName pin_dere_BL, PinName pin_channelA_BL, PinName pin_channelB_BL, + PinName pin_pwm_BR, PinName pin_dere_BR, PinName pin_channelA_BR, PinName pin_channelB_BR, + int rev = 1); + void Drive( double arg_x, double arg_y, double arg_rota, + double F_Gain = 1.0, double B_Gain = 1.0, double R_Gain = 1.0, double L_Gain = 1.0); +private: + void Matrix(double speed[3], double duty[4]); + int rev; + MD_PID *md_fr; + MD_PID *md_fl; + MD_PID *md_bl; + MD_PID *md_br; +}; +#endif \ No newline at end of file