Commit e53e991e authored by 李俭双's avatar 李俭双

feat:增加车速外发接口

parent da3e8754
...@@ -339,6 +339,18 @@ uint16_t Get_DispVechileSpeed(void) ...@@ -339,6 +339,18 @@ uint16_t Get_DispVechileSpeed(void)
return Vspeed; return Vspeed;
} }
/*外发显示车速,精度10倍,取整,舍去小数点*/
uint16_t Get_DispVechileSpeed(void)
{
uint16_t Vspeed = 0;
if ( DataVSpeedDisp >= 1990 )
{
DataVSpeedDisp = 1990;
}
Vspeed = DataVSpeedDisp;
return Vspeed;
}
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#define DATA_VSPEED_INC_STEP 2 //速度增加时慢加速速度变化步长 #define DATA_VSPEED_INC_STEP 2 //速度增加时慢加速速度变化步长
#define DATA_VSPEED_DEC_STEP 6 //方向改变时急减速速度变化步长 #define DATA_VSPEED_DEC_STEP 6 //方向改变时急减速速度变化步长
#define DATA_VSPEED_APPR_SPEED_MIN 2 //最小逼近速度 #define DATA_VSPEED_APPR_SPEED_MIN 2 //最小逼近速度
#define DATA_VSPEED_HYSTERESIS 10 //回差 #define DATA_VSPEED_HYSTERESIS 15 //回差
/*** 控制结构 ***/ /*** 控制结构 ***/
typedef struct typedef struct
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment