Commit a22a0940 authored by hu's avatar hu

调整一般路高速路,急加速急减速策略

parent 648de35b
No preview for this file type
This diff is collapsed.
project .intvect 1536
project .text 321596
project .text 321916
project .rodata 411103
project .secinfo 120
project .syscall 6
......
......@@ -3,6 +3,7 @@
#include "Gauges.h"
#include "GaugesInterface.h"
#include "Common_Interface.h"
#include "GUI.h"
static uint32_t SPEED_RADIO = 637u;
......@@ -13,6 +14,11 @@ uint8_t Vehicle_CurSeg;
uint8_t DataOverSpeed;
uint8_t DataOverSpeedK_Line;
uint32_t SPEED_PPK;
_ACCSUBSPEED AccSubSpeed;
uint16_t Speed_Old ;
uint16_t GslYblSpeedTime ;
volatile uint32_t VehFreBuf[VehFreNum];
void Speed_KL30_Init(void)
......@@ -45,6 +51,9 @@ void Speed_KL15_ON_Init(void)
{
VehFreBuf[i] = 0u;
}
Speed_Old = 0u;
GslYblSpeedTime = 0u;
}
void Speed_KL15_OFF_Init(void)
......@@ -242,15 +251,14 @@ uint8_t Speed_Get_Valid(void)
******************************************************************************/
void Data_Acc_Speed_Processing(void)
{
#if 0
uint16_t Speed_New = 0;
uint16_t AccSpeed = 0;
Speed_New = DATA_VEHICLE_SPEED_DISPLAYING;
Speed_New = Common_Get_Act_V_Speed_Valid();
AccSubSpeed.Sig.ACCSpeed_Time++;
if (AccSubSpeed.Sig.ACCSpeed_Time >= 10)
AccSubSpeed.ACCSpeed_Time++;
if (AccSubSpeed.ACCSpeed_Time >= 10)
{
AccSubSpeed.Sig.ACCSpeed_Time = 0;
AccSubSpeed.ACCSpeed_Time = 0;
if (Speed_Old <= Speed_New)
{
AccSpeed = Speed_New - Speed_Old;
......@@ -258,13 +266,13 @@ void Data_Acc_Speed_Processing(void)
if (AccSpeed > User_App.User_JADD)
{
AccSubSpeed.Sig.AccSpeed_Flag = 1 ;
AccSubSpeed.AccSpeed_Flag = 1 ;
}
else
{
AccSubSpeed.Sig.AccSpeed_Flag = 0 ;
AccSubSpeed.AccSpeed_Flag = 0 ;
}
AccSubSpeed.Sig.SubSpeed_Flag = 0 ;
AccSubSpeed.SubSpeed_Flag = 0 ;
}
else
{
......@@ -272,16 +280,15 @@ void Data_Acc_Speed_Processing(void)
Speed_Old = Speed_New ;
if (AccSpeed > User_App.User_JSUB)
{
AccSubSpeed.Sig.SubSpeed_Flag = 1 ;
AccSubSpeed.SubSpeed_Flag = 1 ;
}
else
{
AccSubSpeed.Sig.SubSpeed_Flag = 0 ;
AccSubSpeed.SubSpeed_Flag = 0 ;
}
AccSubSpeed.Sig.AccSpeed_Flag = 0 ;
AccSubSpeed.AccSpeed_Flag = 0 ;
}
}
#endif
}
/******************************************************************************
函数名:Data_GsLYbL_Speed_Processing
......@@ -291,53 +298,54 @@ void Data_Acc_Speed_Processing(void)
******************************************************************************/
void Data_GsLYbL_Speed_Processing(void)
{
#if 0
uint16_t User_Gsl = 0;
uint16_t User_Ybl = 0;
uint16_t Veh_Speed = 0u;
Veh_Speed = Common_Get_Act_V_Speed_Valid();
User_Gsl = (uint16_t)User_App.User_Gsl * 10 ;
User_Ybl = (uint16_t)User_App.User_Ybl * 10 ;
if ( DATA_VEHICLE_SPEED_DISPLAYING >= 600 )
if ( Veh_Speed >= 600 )
{
if (GslYblSpeedTime <= 6000 )
GslYblSpeedTime++;
}
else if ( DATA_VEHICLE_SPEED_DISPLAYING <= 590 )
else if ( Veh_Speed <= 590 )
{
GslYblSpeedTime = 0;
}
if (GslYblSpeedTime >= 6000)
{
AccSubSpeed.Sig.GslYbl_Flag = 1;
AccSubSpeed.GslYbl_Flag = 1;
}
else
{
AccSubSpeed.Sig.GslYbl_Flag = 0;
AccSubSpeed.GslYbl_Flag = 0;
}
if (AccSubSpeed.Sig.GslYbl_Flag == 1)
if (AccSubSpeed.GslYbl_Flag == 1)
{
if (DATA_VEHICLE_SPEED_DISPLAYING > User_Gsl)
if (Veh_Speed > User_Gsl)
{
AccSubSpeed.Sig.GslSpeed_Flag = 1;
AccSubSpeed.GslSpeed_Flag = 1;
}
else if (DATA_VEHICLE_SPEED_DISPLAYING <= (User_Gsl - 10))
else if (Veh_Speed <= (User_Gsl - 10))
{
AccSubSpeed.Sig.GslSpeed_Flag = 0;
AccSubSpeed.GslSpeed_Flag = 0;
}
}
else
{
if (DATA_VEHICLE_SPEED_DISPLAYING > User_Ybl)
if (Veh_Speed > User_Ybl)
{
AccSubSpeed.Sig.GslSpeed_Flag = 1;
AccSubSpeed.GslSpeed_Flag = 1;
}
else if (DATA_VEHICLE_SPEED_DISPLAYING <= (User_Ybl - 10))
else if (Veh_Speed <= (User_Ybl - 10))
{
AccSubSpeed.Sig.GslSpeed_Flag = 0;
AccSubSpeed.GslSpeed_Flag = 0;
}
}
#endif
}
\ No newline at end of file
......@@ -7,6 +7,21 @@
/*对频率计算车速做平均的个数*/
#define VehFreNum 3u
typedef union
{
uint8_t AccSpeed_Flag ;
uint8_t SubSpeed_Flag ;
uint8_t GslSpeed_Flag ;
uint8_t YblSpeed_Flag ;
uint8_t GslYbl_Flag ;
uint8_t ACCSpeed_Time ;
} _ACCSUBSPEED;
extern _ACCSUBSPEED AccSubSpeed;
extern uint16_t Speed_Old ;
extern uint16_t GslYblSpeedTime ;
extern void Speed_KL30_Init(void);
extern void Speed_KL15_ON_Init(void);
extern void Speed_KL15_OFF_Init(void);
......
#include "Data_Voltmeter.h"
#include "RTE_ADC.h"
#include "GaugesInterface.h"
//-------------------------------------------
//电压计数据处理
//-------------------------------------------
......
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