Commit 0b0f45f0 authored by 李向行's avatar 李向行

feat:T06新增老化台(车速电量优先级大于指示灯)

parent a842a1bb
......@@ -456,7 +456,7 @@ INT16U time_3s = 0;
}
if(RT_10ms >= 10){
if(Key.CAN_Step>12||Key.CAN_Step<1)
if(Key.CAN_Step>11||Key.CAN_Step<1)
{
Key.CAN_Step = 1;
}
......
......@@ -94,30 +94,58 @@ void Set_CAN_CRC(CAN_message * CanMessage){
*/
void Format_CAN_Msg()
{
CanMsg_101.ID = 0x101;
CanMsg_067.ID = 0x67;
CanMsg_600.ID = 0x600;
CanMsg_611.ID = 0x611;
CanMsg_610.ID = 0x610;
CanMsg_101.Length = 8;
CanMsg_067.Length = 8;
CanMsg_600.Length = 8;
CanMsg_611.Length = 8;
CanMsg_610.Length = 8;
CanMsg_101.ID_EN = 1;
CanMsg_067.ID_EN = 1;
CanMsg_600.ID_EN = 1;
CanMsg_611.ID_EN = 1;
CanMsg_610.ID_EN = 1;
CanMsg_0A30FFE8.ID = 0x0A30FFE8;
CanMsg_0A20FFE2.ID = 0x0A20FFE2;
CanMsg_0A40FFE2.ID = 0x0A40FFE2;
CanMsg_0A10FFE0.ID = 0x0A10FFE0;
CanMsg_0A10FFE1.ID = 0x0A10FFE1;
CanMsg_0A33FFE3.ID = 0x0A33FFE3;
CanMsg_0A30FFE3.ID = 0x0A30FFE3;
CanMsg_0A32FFE4.ID = 0x0A32FFE4;
CanMsg_0A37FFE3.ID = 0x0A37FFE3;
CanMsg_0A18FFE0.ID = 0x0A18FFE0;
CanMsg_0A30DDE8.ID = 0x0A30DDE8;
CanMsg_0A30FFE8.Length = 8;
CanMsg_0A20FFE2.Length = 8;
CanMsg_0A40FFE2.Length = 8;
CanMsg_0A10FFE0.Length = 8;
CanMsg_0A10FFE1.Length = 8;
CanMsg_0A33FFE3.Length = 8;
CanMsg_0A30FFE3.Length = 8;
CanMsg_0A32FFE4.Length = 8;
CanMsg_0A37FFE3.Length = 8;
CanMsg_0A18FFE0.Length = 8;
CanMsg_0A30DDE8.Length = 8;
CanMsg_0A30FFE8.ID_EN = 1;
CanMsg_0A20FFE2.ID_EN = 1;
CanMsg_0A40FFE2.ID_EN = 1;
CanMsg_0A10FFE0.ID_EN = 1;
CanMsg_0A10FFE1.ID_EN = 1;
CanMsg_0A33FFE3.ID_EN = 1;
CanMsg_0A30FFE3.ID_EN = 1;
CanMsg_0A32FFE4.ID_EN = 1;
CanMsg_0A37FFE3.ID_EN = 1;
CanMsg_0A18FFE0.ID_EN = 1;
CanMsg_0A30DDE8.ID_EN = 1;
}
void Disable_CAN_Tx(void)
{
CanMsg_101.ID_EN = 0;
CanMsg_067.ID_EN = 0;
CanMsg_600.ID_EN = 0;
CanMsg_611.ID_EN = 0;
CanMsg_610.ID_EN = 0;
CanMsg_0A30FFE8.ID_EN = 0;
CanMsg_0A20FFE2.ID_EN = 0;
CanMsg_0A40FFE2.ID_EN = 0;
CanMsg_0A10FFE0.ID_EN = 0;
CanMsg_0A10FFE1.ID_EN = 0;
CanMsg_0A33FFE3.ID_EN = 0;
CanMsg_0A30FFE3.ID_EN = 0;
CanMsg_0A32FFE4.ID_EN = 0;
CanMsg_0A37FFE3.ID_EN = 0;
CanMsg_0A18FFE0.ID_EN = 0;
CanMsg_0A30DDE8.ID_EN = 0;
}
void Set_Pin(INT16U pin)
......@@ -151,33 +179,45 @@ void App_Can_Proc(void)
if(GetCtrlTime(CANMsgSend_20ms) >= 20){
ClearCtrlTime(CANMsgSend_20ms);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_101);
Clear_CAN_Msg((CAN_message *)&CanMsg_101);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_067);
Clear_CAN_Msg((CAN_message *)&CanMsg_067);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_610);
Clear_CAN_Msg((CAN_message *)&CanMsg_610);
}
if(GetCtrlTime(CANMsgSend_50ms) >= 50){
ClearCtrlTime(CANMsgSend_50ms);
ClearCtrlTime(CANMsgSend_50ms);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A10FFE0);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A10FFE0);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A10FFE1);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A10FFE1);
}
if(GetCtrlTime(CANMsgSend_100ms) >= 100){
ClearCtrlTime(CANMsgSend_100ms);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_600);
Clear_CAN_Msg((CAN_message *)&CanMsg_600);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A30FFE8);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A30FFE8);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A20FFE2);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A20FFE2);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A33FFE3);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A33FFE3);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A30FFE3);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A30FFE3);
}
if(GetCtrlTime(CANMsgSend_200ms) >= 200){
ClearCtrlTime(CANMsgSend_200ms);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A32FFE4);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A32FFE4);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A37FFE3);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A37FFE3);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A18FFE0);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A18FFE0);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A30DDE8);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A30DDE8);
}
if(GetCtrlTime(CANMsgSend_500ms) >= 500){
flash_1Hz_process();
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_611);
Clear_CAN_Msg((CAN_message *)&CanMsg_611);
bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_0A40FFE2);
Clear_CAN_Msg((CAN_message *)&CanMsg_0A40FFE2);
ClearCtrlTime(CANMsgSend_500ms);
}
......@@ -202,41 +242,35 @@ void App_Can_Proc(void)
//CurValueStr[ENUM_VSpeed ].val = 0;
CurValueStr[ENUM_VSpeed ].val = 0;
CurValueStr[ECM_FaultIndicator ].val = 0;
CurValueStr[ECM_StautsInvalid ].val = 0;
CurValueStr[ECM_MotorOver ].val = 0;
CurValueStr[ECM_ReadyIndicator ].val = 0;
CurValueStr[ECM_ChargeStatus ].val = 0;
CurValueStr[ECM_CruiseStatus ].val = 0;
CurValueStr[ECM_GearPositionStatus ].val = 0;
CurValueStr[PFC_Relag ].val = 0;
CurValueStr[LLC_UnderOutput ].val = 0;
CurValueStr[LLC_OverOutput ].val = 0;
CurValueStr[LLC_OutPut ].val = 0;
CurValueStr[PFC_LLC_Interal_Communication].val = 0;
CurValueStr[LLC_Temp ].val = 0;
CurValueStr[Battery_status ].val = 0;
CurValueStr[Battery_Current ].val = 0;
CurValueStr[Battery_SOC ].val = 0;
CurValueStr[ENUM_VSpeed ].fval = Value_Plus;
CurValueStr[ECM_FaultIndicator ].fval = Value_Plus;
CurValueStr[ECM_StautsInvalid ].fval = Value_Plus;
CurValueStr[ECM_MotorOver ].fval = Value_Plus;
CurValueStr[ECM_ReadyIndicator ].fval = Value_Plus;
CurValueStr[ECM_ChargeStatus ].fval = Value_Plus;
CurValueStr[ECM_CruiseStatus ].fval = Value_Plus;
CurValueStr[ECM_GearPositionStatus ].fval = Value_Plus;
CurValueStr[PFC_Relag ].fval = Value_Plus;
CurValueStr[LLC_UnderOutput ].fval = Value_Plus;
CurValueStr[LLC_OverOutput ].fval = Value_Plus;
CurValueStr[LLC_OutPut ].fval = Value_Plus;
CurValueStr[PFC_LLC_Interal_Communication].fval = Value_Plus;
CurValueStr[LLC_Temp ].fval = Value_Plus;
CurValueStr[Battery_status ].fval = Value_Plus;
CurValueStr[Battery_Current ].fval = Value_Plus;
CurValueStr[Battery_SOC ].fval = Value_Plus;
CurValueStr[T06_VSpeed ].val = 0;
CurValueStr[T06_Battery_Power1 ].val = 0;
CurValueStr[T06_Battery_Power2 ].val = 0;
CurValueStr[T06_ABS ].val = 0;
CurValueStr[T06_Cruise ].val = 0;
CurValueStr[T06_The_Initial_Value_Abnormal ].val = 0;
CurValueStr[T06_P_File_Status_READY ].val = 0;
CurValueStr[T06_BlueTooth ].val = 0;
CurValueStr[T06_GPS_Status ].val = 0;
CurValueStr[T06_IOT_TCS_Level_Setting_Feedback ].val = 0;
CurValueStr[T06_Telephone_Reminder ].val = 0;
CurValueStr[T06_Support_Switch_State ].val = 0;
CurValueStr[T06_GSM_Status ].val = 0;
CurValueStr[T06_Parallel_Connection_of_Batteries].val = 0;
CurValueStr[T06_VSpeed ].fval = Value_Plus;
CurValueStr[T06_Battery_Power1 ].fval = Value_Plus;
CurValueStr[T06_Battery_Power2 ].fval = Value_Plus;
CurValueStr[T06_ABS ].fval = Value_Plus;
CurValueStr[T06_Cruise ].fval = Value_Plus;
CurValueStr[T06_The_Initial_Value_Abnormal ].fval = Value_Plus;
CurValueStr[T06_P_File_Status_READY ].fval = Value_Plus;
CurValueStr[T06_BlueTooth ].fval = Value_Plus;
CurValueStr[T06_GPS_Status ].fval = Value_Plus;
CurValueStr[T06_IOT_TCS_Level_Setting_Feedback ].fval = Value_Plus;
CurValueStr[T06_Telephone_Reminder ].fval = Value_Plus;
CurValueStr[T06_Support_Switch_State ].fval = Value_Plus;
CurValueStr[T06_GSM_Status ].fval = Value_Plus;
CurValueStr[T06_Parallel_Connection_of_Batteries].fval = Value_Plus;
// CurVehSpeed = 0;
//LDW Open
......
This diff is collapsed.
......@@ -41,23 +41,21 @@ typedef struct
enum
{
ENUM_VSpeed = 0, // ����
ECM_FaultIndicator,
ECM_StautsInvalid,
ECM_MotorOver,
ECM_ReadyIndicator,
ECM_ChargeStatus,
ECM_CruiseStatus,
ECM_GearPositionStatus,
PFC_Relag,
LLC_UnderOutput,
LLC_OverOutput,
LLC_OutPut,
PFC_LLC_Interal_Communication,
LLC_Temp,
Battery_status,
Battery_Current,
Battery_SOC,
T06_VSpeed = 0, //车速
T06_Battery_Power1, //电池电量1
T06_Battery_Power2, //电池电量2
T06_ABS, //ABS
T06_Cruise, //巡航
T06_The_Initial_Value_Abnormal, //发动机
T06_P_File_Status_READY, //READY(P挡)
T06_BlueTooth, //蓝牙
T06_GPS_Status, //无GPS信号
T06_IOT_TCS_Level_Setting_Feedback, //TCS指示灯
T06_Telephone_Reminder, //来电显示
T06_Support_Switch_State, //侧撑指示灯
T06_GSM_Status, //无GSM信号
T06_Parallel_Connection_of_Batteries, //并联信号
CAN_List_Num,
};
......@@ -65,23 +63,20 @@ EXTERN_APP_TEST volatile s_CurValue CurValueStr[CAN_List_Num];
static const s_CAN_List CAN_List[] =
{
{&CanMsg_101, 2, 0, 16,0,Offset_Plus, 1, 1, &CurValueStr[ENUM_VSpeed ], Motorola},
{&CanMsg_067, 2, 0, 16, 0,Offset_Plus, 1, 1, &CurValueStr[ECM_FaultIndicator ], Motorola},
{&CanMsg_067, 3, 0, 2, 0, Offset_Plus, 1, 1, &CurValueStr[ECM_StautsInvalid ], Motorola},
{&CanMsg_067, 3, 2, 2, 0, Offset_Plus, 1, 1, &CurValueStr[ECM_MotorOver ], Motorola},
{&CanMsg_067, 3, 4, 1, 0, Offset_Plus, 1, 1, &CurValueStr[ECM_ReadyIndicator ], Motorola},
{&CanMsg_067, 3, 6, 1, 0, Offset_Plus, 1, 1, &CurValueStr[ECM_ChargeStatus ], Motorola},
{&CanMsg_067, 4, 2, 1, 0, Offset_Plus, 1, 1, &CurValueStr[ECM_CruiseStatus ], Motorola},
{&CanMsg_067, 5, 0, 3, 0, Offset_Plus, 1, 1, &CurValueStr[ECM_GearPositionStatus ], Motorola},
{&CanMsg_600, 0, 0, 1, 0, Offset_Plus, 1, 1, &CurValueStr[PFC_Relag ], Motorola},
{&CanMsg_600, 0, 1, 1, 0, Offset_Plus, 1, 1, &CurValueStr[LLC_UnderOutput ], Motorola},
{&CanMsg_600, 0, 2, 1, 0, Offset_Plus, 1, 1, &CurValueStr[LLC_OverOutput ], Motorola},
{&CanMsg_600, 0, 3, 1, 0, Offset_Plus, 1, 1, &CurValueStr[LLC_OutPut ], Motorola},
{&CanMsg_600, 0, 4, 1, 0, Offset_Plus, 1, 1, &CurValueStr[PFC_LLC_Interal_Communication ], Motorola},
{&CanMsg_600, 0, 5, 1, 0, Offset_Plus, 1, 1, &CurValueStr[LLC_Temp ], Motorola},
{&CanMsg_610, 0, 0, 8, 0, Offset_Plus, 1, 1, &CurValueStr[Battery_status ], Motorola},
{&CanMsg_610,2,0, 16,255,Offset_Minus, 10, 1, &CurValueStr[Battery_Current ], Motorola},
{&CanMsg_611, 0, 0, 8, 0, Offset_Plus, 1, 1, &CurValueStr[Battery_SOC ], Motorola},
{&CanMsg_0A33FFE3, 0, 0, 16,0,Offset_Plus, 1, 1, &CurValueStr[T06_VSpeed ], Intel},
{&CanMsg_0A10FFE0, 2, 0, 16,0,Offset_Plus, 1, 1, &CurValueStr[T06_Battery_Power1 ], Intel},
{&CanMsg_0A10FFE1, 2, 0, 16,0, Offset_Plus, 1, 1, &CurValueStr[T06_Battery_Power2 ], Intel},
{&CanMsg_0A30FFE8, 0, 6, 1, 0, Offset_Plus, 1, 1, &CurValueStr[T06_ABS ], Intel},
{&CanMsg_0A20FFE2, 1, 2, 2, 0, Offset_Plus, 1, 1, &CurValueStr[T06_Cruise ], Intel},
{&CanMsg_0A40FFE2, 0, 4, 1, 0, Offset_Plus, 1, 1, &CurValueStr[T06_The_Initial_Value_Abnormal], Intel},
{&CanMsg_0A20FFE2, 0, 4, 2, 0, Offset_Plus, 1, 1, &CurValueStr[T06_P_File_Status_READY ], Intel},
{&CanMsg_0A30FFE3, 7, 7, 1, 0, Offset_Plus, 1, 1, &CurValueStr[T06_BlueTooth ], Intel},
{&CanMsg_0A32FFE4, 0, 1, 1, 0, Offset_Plus, 1, 1, &CurValueStr[T06_GPS_Status ], Intel},
{&CanMsg_0A30DDE8, 6, 2, 3, 0, Offset_Plus, 1, 1, &CurValueStr[T06_IOT_TCS_Level_Setting_Feedback], Intel},
{&CanMsg_0A37FFE3, 7, 0, 1, 0, Offset_Plus, 1, 1, &CurValueStr[T06_Telephone_Reminder ], Intel},
{&CanMsg_0A20FFE2, 4, 2, 1, 0, Offset_Plus, 1, 1, &CurValueStr[T06_Support_Switch_State ], Intel},
{&CanMsg_0A32FFE4, 0, 0, 1, 0, Offset_Plus, 1, 1, &CurValueStr[T06_GSM_Status ], Intel},
{&CanMsg_0A18FFE0, 0, 0, 3, 0, Offset_Plus, 1, 1, &CurValueStr[T06_Parallel_Connection_of_Batteries], Intel},
};
extern unsigned int Key_Dodging_flag;
extern unsigned int lost_flag;
......
......@@ -106,6 +106,18 @@
extern CAN_message CanMsg_0A30FFE8;
extern CAN_message CanMsg_0A20FFE2;
extern CAN_message CanMsg_0A40FFE2;
extern CAN_message CanMsg_0A10FFE0;
extern CAN_message CanMsg_0A10FFE1;
extern CAN_message CanMsg_0A33FFE3;
extern CAN_message CanMsg_0A30FFE3;
extern CAN_message CanMsg_0A32FFE4;
extern CAN_message CanMsg_0A37FFE3;
extern CAN_message CanMsg_0A20FFE2;
extern CAN_message CanMsg_0A18FFE0;
extern CAN_message CanMsg_0A30DDE8;
/*zh:*/
/*CS08 test*/
EXTERN_VAR CAN_message CanMsg_101;
......
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