my_test.h
1.34 KB
#ifndef _MY_TEST_H
#define _MY_TEST_H
#include"sys.h"
typedef struct
{
double target_v;
double initial_v;
double de_dis;
double t;
double dis;
double k;
double b;
double cofficient1;
double cofficient2;
}AC_DE_STATE;
//extern AC_DE_STATE ACCELERATE_STATE;
//extern AC_DE_STATE DECELERATE_STATE;
extern AC_DE_STATE ACCELERATE_DECELERATE_STATE;
//void ACCELERATE_SET(double target_v,double initial_v,double ac_t);//target_v目标速度;initial_v初速度;ac_t加速时间
//double ACCELERATE_SPEED(double target_v,double initial_v,double ac_t,u8 pulse,double pulse_t);//pulse脉冲;pulse脉冲周期;initial_v初速度;ac_t加速时间
//void DECELERATE_SET(double target_v,double initial_v,double de_t);//target_v目标速度;initial_v初速度;ac_t加速时间
//double DECELERATE_SPEED(double target_v,double initial_v,double de_t,u8 pulse,double pulse_t);//pulse脉冲;pulse脉冲周期;initial_v初速度;ac_t加速时间
double SPEEDMAX_SELECTOR(double surplus_dis,double v_init,double v_end,double ac,double de,double delaytt,double vmax1,double vmax2,double vmax3);
void ACCELERATE_DECELERATE_SET(AC_DE_STATE* accelerate_decelerate_state,u8 mode);
double ACCELERATE_DECELERATE_SPEED(AC_DE_STATE* accelerate_decelerate_state,u8 pulse,double pulse_t);//pulse脉冲;pulse脉冲周期
//void ACCELERATE_RESET(void);
//void DECELERATE_RESET(void);
void ACCELERATE_DECELERATE_RESET(void);
#endif