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

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

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