Omni_2017_a

Dependencies:   mbed

Fork of Omni_2017_z by 広田 勇斗

Revision:
0:fd933ea5f19d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/2017_3/2017_3_z.h	Sat Aug 05 02:29:14 2017 +0000
@@ -0,0 +1,27 @@
+#ifndef _OMNI_3_H_
+#define _OMNI_3_H_
+#include "mbed.h"
+#include "MD.h"
+#include "MD_PID.h"
+
+class Omni_3{
+public:
+    Omni_3(PinName pin_pwm_F1, PinName pin_pwm_F2, PinName pin_dere_F1, PinName pin_dere_F2, PinName pin_channelA_F, PinName pin_channelB_F,
+           PinName pin_pwm_L1, PinName pin_pwm_L2, PinName pin_dere_L1, PinName pin_dere_L2, PinName pin_channelA_L, PinName pin_channelB_L,
+           PinName pin_pwm_R1, PinName pin_pwm_R2, PinName pin_dere_R1, PinName pin_dere_R2, PinName pin_channelA_R, PinName pin_channelB_R,
+           int rev = 1);
+    void Drive( double arg_x, double arg_y, double arg_rota,
+    			double F_Gain = 1.0, double L_Gain = 1.0, double R_Gain = 1.0);
+    			
+private:
+    void Matrix(double speed[3], double duty[3]);
+    int rev;
+    MD_PID *md_f1;
+    MD_PID *md_f2;
+    MD_PID *md_l1;
+    MD_PID *md_l2;
+    MD_PID *md_r1;
+    MD_PID *md_r2;
+};
+#endif
+