ALPHA_A

Dependencies:   DataPool MD_PID mbed

2017_4/2017_4.h

Committer:
hirotayamato
Date:
2017-09-15
Revision:
6:bb5e51ded250
Parent:
4:169a7b6c0138

File content as of revision 6:bb5e51ded250:

#ifndef _Mecanamu_4_H_
#define _Mecanamu_4_H_
#include "mbed.h"
#include "MD.h"
#include "MD_PID.h"

class Mecanamu_4{
public:
    Mecanamu_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