新部内対抗A班 / Mbed 2 deprecated circle_war_ver_A_NUCLEO__

Dependencies:   mbed

Fork of circle_war_ver_A_NUCLEO_ by 新部内対抗A班

Committer:
baba2357
Date:
Tue Apr 05 17:25:09 2016 +0000
Revision:
14:3403ce49a37a
Parent:
11:f8fac9693cd5
??????;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
username16248 9:92ddadd9e9a9 1 //for speed control
username16248 9:92ddadd9e9a9 2 #ifndef SPEED_CONTROL_H
username16248 9:92ddadd9e9a9 3 #define SPEED_CONTROL_H
username16248 9:92ddadd9e9a9 4
baba2357 14:3403ce49a37a 5 //Ticker rot_cal;
baba2357 14:3403ce49a37a 6 /*float angle_f=0.0,angle_r=0.0,angle_l=0.0;
username16248 11:f8fac9693cd5 7 float angle_old_f=0.0,angle_old_r=0.0,angle_old_l=0.0;
username16248 11:f8fac9693cd5 8 float duty_out_f=0.0,duty_out_r=0.0,duty_out_l=0.0;
username16248 11:f8fac9693cd5 9 float duty_PID_f=0.0,duty_PID_r=0.0,duty_PID_l=0.0;
username16248 11:f8fac9693cd5 10 float omega_now_f=0.0,omega_now_r=0.0,omega_now_l=0.0;
username16248 11:f8fac9693cd5 11 float rot_now_f=0.0,rot_now_r=0.0,rot_now_l=0.0;
username16248 11:f8fac9693cd5 12 float rot_old_f=0.0,rot_old_r=0.0,rot_old_l=0.0;
username16248 11:f8fac9693cd5 13 float rot_PID_f=0.0,rot_PID_r=0.0,rot_PID_l=0.0;
username16248 11:f8fac9693cd5 14 float rot_prop_f=0.0,rot_prop_r=0.0,rot_prop_l=0.0;
username16248 11:f8fac9693cd5 15 float rot_diff_f=0.0,rot_diff_r=0.0,rot_diff_l=0.0;
username16248 11:f8fac9693cd5 16 float rot_inte_f=0.0,rot_inte_r=0.0,rot_inte_l=0.0;
username16248 11:f8fac9693cd5 17 int dir_f,dir_r,dir_l;
username16248 11:f8fac9693cd5 18 const float Kp_f=30.0000f,Kd_f=200.0000f,Ki_f=0.0001f;
username16248 11:f8fac9693cd5 19 const float Kp_r=30.0000f,Kd_r=200.0000f,Ki_r=0.0001f;
username16248 11:f8fac9693cd5 20 const float Kp_l=30.0000f,Kd_l=200.0000f,Ki_l=0.0001f;
username16248 11:f8fac9693cd5 21 const float resolution=1024.0;
username16248 11:f8fac9693cd5 22 int t=0;
username16248 11:f8fac9693cd5 23 */
username16248 11:f8fac9693cd5 24 void motor_setting();
baba2357 14:3403ce49a37a 25 void rotation_cal();
baba2357 14:3403ce49a37a 26 void motor_f(int dir_f,float rot_target_f);
baba2357 14:3403ce49a37a 27 void motor_r(int dir_r,float rot_target_r);
baba2357 14:3403ce49a37a 28 void motor_l(int dir_l,float rot_target_l);
baba2357 14:3403ce49a37a 29 void motor_target(double rot_target_f,double rot_target_r,double rot_target_l);
username16248 9:92ddadd9e9a9 30
username16248 9:92ddadd9e9a9 31 #endif