Commit fcc380c4 authored by 梁百峰's avatar 梁百峰

feat:雅迪检测台写入

parent c6cad5b7
...@@ -14,6 +14,7 @@ uint32_t R485_Send_0x40(void) ...@@ -14,6 +14,7 @@ uint32_t R485_Send_0x40(void)
case 2: case 2:
break; break;
case 3: case 3:
// memset(R485_ID40h.Msg, 0, 64);
break; break;
case 4: case 4:
break; break;
...@@ -69,8 +70,8 @@ uint32_t R485_Send_0x41(void) ...@@ -69,8 +70,8 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.CruiseMode = 0x0; //巡航 R485_ID41h.Sig.CruiseMode = 0x0; //巡航
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0; //速度 = (X * 0.512 * 3.14 * 1.05) / 30 R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0; //速度 = (X * 0.512 * 3.14 * 1.05) / 30
// R485_ID41h.Sig.TotalBatterySOC = 0x0; //电量 R485_ID41h.Sig.TotalBatterySOC = 0x0; //电量
// R485_ID41h.Sig.VehicleStatus = 0x0; //整车状态 // R485_ID41h.Sig.VehicleStatus = 0x3; //整车状态
// R485_ID41h.Sig.SpeedGear = 0x2; //挡位 // R485_ID41h.Sig.SpeedGear = 0x2; //挡位
...@@ -197,7 +198,56 @@ uint32_t R485_Send_0x41(void) ...@@ -197,7 +198,56 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.RotorLocked = 0; R485_ID41h.Sig.RotorLocked = 0;
break; break;
case 3: case 3:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯 if(clearodoflag == 1)
{
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
R485_ID41h.Sig.TCSFunctionalStatus = 0x0; //TCS状态
R485_ID41h.Sig.ElectronicCushionStatus = 0x1; //座桶开关
R485_ID41h.Sig.SupportSwitchSignalFeedback = 0x0; //边撑
R485_ID41h.Sig.CruiseMode = 0x0; //巡航
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0x300; //速度 = (X * 0.512 * 3.14 * 1.05) / 30 22km
R485_ID41h.Sig.TotalBatterySOC = 0x2C; //电量
R485_ID41h.Sig.VehicleStatus = 0x3; //整车状态
R485_ID41h.Sig.SpeedGear = 0x1; //挡位
R485_ID41h.Sig.TotalBatteryVoltage = 0x4B; //总电池电压
R485_ID41h.Sig.IOTRealTime_Hour = 0x16; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0x16; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
R485_ID41h.Sig.HandlebarFaultIndicator = 0;
R485_ID41h.Sig.UUpBridgeArmMosFault = 0;
R485_ID41h.Sig.UDownBridgeArmMosFault = 0;
R485_ID41h.Sig.VUpBridgeArmMosFault = 0;
R485_ID41h.Sig.VDownBridgeArmMosFault = 0;
R485_ID41h.Sig.WUpBridgeArmMosFault = 0;
R485_ID41h.Sig.WDownBridgeArmMosFault = 0;
R485_ID41h.Sig.MCUFaultStateU_PhaseHallFault = 0;
R485_ID41h.Sig.MCUFaultStateV_PhaseHallFault = 0;
R485_ID41h.Sig.MCUFaultStateW_PhaseHallFault = 0;
R485_ID41h.Sig.MCUFaultStatus_HandlebarFault = 0;
R485_ID41h.Sig.BMS_0CommunicationStatus = 0;
R485_ID41h.Sig.MCUCommunicationStatus = 0;
R485_ID41h.Sig.ALMCommunicationStatus = 0;
R485_ID41h.Sig.ICMCommunicationStatus = 0;
R485_ID41h.Sig.BrakeLeverFault = 0;
R485_ID41h.Sig.PhaseLossFault = 0;
R485_ID41h.Sig.MCUOverTempProtection = 0;
R485_ID41h.Sig.MotorOvertempProtection = 0;
R485_ID41h.Sig.RotorLocked = 0;
}
else
{
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
...@@ -241,6 +291,8 @@ uint32_t R485_Send_0x41(void) ...@@ -241,6 +291,8 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.MCUOverTempProtection = 0; R485_ID41h.Sig.MCUOverTempProtection = 0;
R485_ID41h.Sig.MotorOvertempProtection = 0; R485_ID41h.Sig.MotorOvertempProtection = 0;
R485_ID41h.Sig.RotorLocked = 0; R485_ID41h.Sig.RotorLocked = 0;
}
break; break;
case 4: case 4:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
...@@ -530,7 +582,7 @@ uint32_t R485_Send_0x41(void) ...@@ -530,7 +582,7 @@ uint32_t R485_Send_0x41(void)
break; break;
case 10: case 10:
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0x300; //速度 = (X * 0.512 * 3.14 * 1.05) / 30 88km R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0x300; //速度 = (X * 0.512 * 3.14 * 1.05) / 30 88km
R485_ID41h.Sig.TotalBatterySOC = 0xC6; //电量 R485_ID41h.Sig.TotalBatterySOC = 0xC8; //电量
R485_ID41h.Sig.VehicleStatus = 0x3; //整车状态 R485_ID41h.Sig.VehicleStatus = 0x3; //整车状态
R485_ID41h.Sig.SpeedGear = 0; //挡位 R485_ID41h.Sig.SpeedGear = 0; //挡位
//功率暂空一会做 //功率暂空一会做
...@@ -716,16 +768,12 @@ uint32_t R485_Send_0x47(void) ...@@ -716,16 +768,12 @@ uint32_t R485_Send_0x47(void)
break; break;
case 4: case 4:
// zhenduanflag = 0; // zhenduanflag = 0;
// Port_SetPinConfig(1, 19, &stc_OUT_pin_config); // VBAT~
// Port_SetPinConfig(1, 20, &stc_OUT_pin_config); // VBAT
// Port_SetPinConfig(1, 21, &stc_OUT_pin_config); //DC12V
// Port_SetPinConfig(1, 15, &stc_OUT_pin_config); // ACC1
Port_SetPortPinLevel(1, 19, PortGpioLow); Port_SetPortPinLevel(1, 19, PortGpioLow);
Port_SetPortPinLevel(1, 20, PortGpioLow); Port_SetPortPinLevel(1, 20, PortGpioLow);
Port_SetPortPinLevel(1, 21, PortGpioLow); Port_SetPortPinLevel(1, 21, PortGpioLow);
Port_SetPortPinLevel(1, 15, PortGpioLow); Port_SetPortPinLevel(1, 15, PortGpioLow);
g_Stage = 1;
// zhenduansendStep = 0; // zhenduansendStep = 0;
// zhenduanflag = 0; // zhenduanflag = 0;
break; break;
...@@ -733,7 +781,11 @@ uint32_t R485_Send_0x47(void) ...@@ -733,7 +781,11 @@ uint32_t R485_Send_0x47(void)
break; break;
} }
RS485_TX_finish = 1; RS485_TX_finish = 1;
u32sendendflag = R485_Send(0x47, R485_zhenduan_Msg, length); if(zhenduansendStep != 4)
{
u32sendendflag = R485_Send(0x47, R485_zhenduan_Msg, length);
}
RS485_send_time = 0; RS485_send_time = 0;
Delay(10); Delay(10);
Port_SetPortPinLevel(1, 4, PortGpioLow); Port_SetPortPinLevel(1, 4, PortGpioLow);
...@@ -817,3 +869,27 @@ uint32_t R485_Send_Line_0x47(uint8_t n) ...@@ -817,3 +869,27 @@ uint32_t R485_Send_Line_0x47(uint8_t n)
return u32sendendflag; return u32sendendflag;
} }
uint32_t R485_Send_clear(void)
{
uint8_t length;
HJ_OtherKeyCurrent.count = 3;
uint32_t u32sendendflag = 0;
if(RS485_TX_finish == 0)
{
if(RS485_send_time > 3000)
{
Port_SetPortPinLevel(1, 4, PortGpioHigh);
Delay(10);
RS485_TX_finish = 1;
u32sendendflag = R485_Send(0x41, R485_ID41h.Msg, sizeof(R485_ID41h.Msg));
RS485_send_time = 0;
Delay(10);
Port_SetPortPinLevel(1, 4, PortGpioLow);
Delay(10);
RS485_TX_finish = 1;
}
}
RS485_TX_finish = 1;
Port_SetPortPinLevel(1, 4, PortGpioLow);
return u32sendendflag;
}
\ No newline at end of file
...@@ -1129,4 +1129,6 @@ extern uint32_t R485_Send_0x42(void); ...@@ -1129,4 +1129,6 @@ extern uint32_t R485_Send_0x42(void);
extern uint32_t R485_Send_0x47(void); extern uint32_t R485_Send_0x47(void);
extern uint32_t R485_Send_Line_0x47(uint8_t n); extern uint32_t R485_Send_Line_0x47(uint8_t n);
extern uint32_t R485_Send_clear(void);
#endif #endif
...@@ -76,6 +76,8 @@ void Api_GPIO_Init(void) ...@@ -76,6 +76,8 @@ void Api_GPIO_Init(void)
// Port_SetPinConfig(1, 7, &stc_IN_pin_config); //不知道什么功能连着5V电源 // Port_SetPinConfig(1, 7, &stc_IN_pin_config); //不知道什么功能连着5V电源
Port_SetPinConfig(1, 10, &stc_IN_pin_config); // 左转向输出采AD Port_SetPinConfig(1, 10, &stc_IN_pin_config); // 左转向输出采AD
// Port_SetPinConfig(1, 19, &stc_IN_pin_config); // VBAT~
Port_EnableInput(); Port_EnableInput();
//-----------------------OUT---------------------------// //-----------------------OUT---------------------------//
...@@ -101,6 +103,7 @@ void Api_GPIO_Init(void) ...@@ -101,6 +103,7 @@ void Api_GPIO_Init(void)
Port_SetPinConfig(2, 21, &stc_OUT_pin_config); //双闪按键 Port_SetPinConfig(2, 21, &stc_OUT_pin_config); //双闪按键
Port_SetPinConfig(2, 14, &stc_OUT_pin_config); //按键+ Port_SetPinConfig(2, 14, &stc_OUT_pin_config); //按键+
Port_SetPinConfig(2, 13, &stc_OUT_pin_config); //按键- Port_SetPinConfig(2, 13, &stc_OUT_pin_config); //按键-
Port_SetPinConfig(2, 9, &stc_OUT_pin_config);//确认键
Port_SetPinConfig(0, 30, &stc_OUT_pin_config); //蓝牙指示灯 Port_SetPinConfig(0, 30, &stc_OUT_pin_config); //蓝牙指示灯
Port_SetPinConfig(2, 0, &stc_OUT_pin_config); //远光 Port_SetPinConfig(2, 0, &stc_OUT_pin_config); //远光
...@@ -154,6 +157,7 @@ void Api_GPIO_Init(void) ...@@ -154,6 +157,7 @@ void Api_GPIO_Init(void)
.enGpioDirection = PortGpioOutput, .enGpioDirection = PortGpioOutput,
.enGpioInitOutputLevel = PortGpioHigh, .enGpioInitOutputLevel = PortGpioHigh,
}; };
// Port_SetPinConfig(2, 28, &stc_OUT_pin_high_config); //AIRBAG_OFF_OUT // Port_SetPinConfig(2, 28, &stc_OUT_pin_high_config); //AIRBAG_OFF_OUT
} }
...@@ -177,7 +181,10 @@ void Line_Temp(void) ...@@ -177,7 +181,10 @@ void Line_Temp(void)
LINE_TurnRightOFF; LINE_TurnRightOFF;
LINE_ABSON; LINE_ABSON;
LINE_BLEOFF; LINE_BLEOFF;
zhenduanflag = 0; if(zhenduanflag != 1)
{
zhenduanflag = 0;
}
break; break;
case 1: case 1:
...@@ -189,7 +196,7 @@ void Line_Temp(void) ...@@ -189,7 +196,7 @@ void Line_Temp(void)
LINE_ABSOFF; LINE_ABSOFF;
LINE_BLEOFF; LINE_BLEOFF;
lineNum = 5; lineNum = 5;
if(zhenduanflag != 2) if(zhenduanflag != 1)
{ {
if(LineGetSta.lowlight1 != 1) if(LineGetSta.lowlight1 != 1)
{ {
...@@ -206,7 +213,7 @@ void Line_Temp(void) ...@@ -206,7 +213,7 @@ void Line_Temp(void)
LINE_ABSOFF; LINE_ABSOFF;
LINE_BLEOFF; LINE_BLEOFF;
lineNum = 6; lineNum = 6;
if(zhenduanflag != 2) if(zhenduanflag != 1)
{ {
if(LineGetSta.highlight1 != 1) if(LineGetSta.highlight1 != 1)
{ {
...@@ -223,7 +230,7 @@ void Line_Temp(void) ...@@ -223,7 +230,7 @@ void Line_Temp(void)
LINE_ABSOFF; LINE_ABSOFF;
LINE_BLEOFF; LINE_BLEOFF;
lineNum = 7; lineNum = 7;
if(zhenduanflag != 2) if(zhenduanflag != 1)
{ {
if(LineGetSta.weizhilight1 != 1) if(LineGetSta.weizhilight1 != 1)
{ {
...@@ -239,7 +246,10 @@ void Line_Temp(void) ...@@ -239,7 +246,10 @@ void Line_Temp(void)
LINE_TurnRightOFF; LINE_TurnRightOFF;
LINE_ABSOFF; LINE_ABSOFF;
LINE_BLEOFF; LINE_BLEOFF;
zhenduanflag = 0; if(zhenduanflag != 1)
{
zhenduanflag = 0;
}
break; break;
case 5: case 5:
LINE_LampLowOFF; LINE_LampLowOFF;
...@@ -249,7 +259,10 @@ void Line_Temp(void) ...@@ -249,7 +259,10 @@ void Line_Temp(void)
LINE_TurnRightOFF; LINE_TurnRightOFF;
LINE_ABSOFF; LINE_ABSOFF;
LINE_BLEOFF; LINE_BLEOFF;
zhenduanflag = 0; if(zhenduanflag != 1)
{
zhenduanflag = 0;
}
break; break;
case 6: case 6:
LINE_LampLowOFF; LINE_LampLowOFF;
...@@ -259,7 +272,10 @@ void Line_Temp(void) ...@@ -259,7 +272,10 @@ void Line_Temp(void)
LINE_TurnRightOFF; LINE_TurnRightOFF;
LINE_ABSOFF; LINE_ABSOFF;
LINE_BLEOFF; LINE_BLEOFF;
zhenduanflag = 0; if(zhenduanflag != 1)
{
zhenduanflag = 0;
}
break; break;
case 7: case 7:
LINE_LampLowOFF; LINE_LampLowOFF;
...@@ -270,7 +286,7 @@ void Line_Temp(void) ...@@ -270,7 +286,7 @@ void Line_Temp(void)
LINE_ABSON; LINE_ABSON;
LINE_BLEOFF; LINE_BLEOFF;
lineNum = 4; lineNum = 4;
if(zhenduanflag != 2) if(zhenduanflag != 1)
{ {
if(LineGetSta.ABSlight1 != 1) if(LineGetSta.ABSlight1 != 1)
{ {
...@@ -287,7 +303,7 @@ void Line_Temp(void) ...@@ -287,7 +303,7 @@ void Line_Temp(void)
LINE_ABSOFF; LINE_ABSOFF;
LINE_BLEON; LINE_BLEON;
lineNum = 1; lineNum = 1;
if(zhenduanflag != 2) if(zhenduanflag != 1)
{ {
if(LineGetSta.ble1 != 1) if(LineGetSta.ble1 != 1)
{ {
...@@ -303,17 +319,36 @@ void Line_Temp(void) ...@@ -303,17 +319,36 @@ void Line_Temp(void)
LINE_TurnRightOFF; LINE_TurnRightOFF;
LINE_ABSOFF; LINE_ABSOFF;
LINE_BLEOFF; LINE_BLEOFF;
zhenduanflag = 0; if(zhenduanflag != 1)
{
zhenduanflag = 0;
}
break; break;
case 10: case 10:
LINE_LampLowON; LINE_LampLowOFF;
LINE_LampHighON; LINE_LampHighOFF;
LINE_weizhiON; LINE_weizhiOFF;
LINE_TurnLeftON; LINE_TurnLeftOFF;
LINE_TurnRightON; LINE_TurnRightOFF;
LINE_ABSON; LINE_ABSOFF;
LINE_BLEOFF;
if(zhenduanflag != 1)
{
zhenduanflag = 0;
}
break;
case 11:
LINE_LampLowOFF;
LINE_LampHighOFF;
LINE_weizhiOFF;
LINE_TurnLeftOFF;
LINE_TurnRightOFF;
LINE_ABSOFF;
LINE_BLEON; LINE_BLEON;
zhenduanflag = 0; if(zhenduanflag != 1)
{
zhenduanflag = 0;
}
break; break;
default: default:
LINE_LampLowOFF; LINE_LampLowOFF;
...@@ -323,7 +358,10 @@ void Line_Temp(void) ...@@ -323,7 +358,10 @@ void Line_Temp(void)
LINE_TurnRightOFF; LINE_TurnRightOFF;
LINE_ABSOFF; LINE_ABSOFF;
LINE_BLEOFF; LINE_BLEOFF;
zhenduanflag = 0; if(zhenduanflag != 1)
{
zhenduanflag = 0;
}
break; break;
} }
} }
......
...@@ -505,11 +505,13 @@ extern uint32_t Time_100us_Uart9; ...@@ -505,11 +505,13 @@ extern uint32_t Time_100us_Uart9;
static void TIMER4_50US_ISR(void) static void TIMER4_50US_ISR(void)
{ {
if(Time_100us < 0xffffffff) if(Time_100us < 0xffffffff)
Time_100us++; Time_100us++;
if(RS485_send_time < 0xffffffff)
RS485_send_time++; RS485_send_time++;
if(Time_100us_Uart9 < 0xffffffff) if(Time_100us_Uart9 < 0xffffffff)
Time_100us_Uart9++; Time_100us_Uart9++;
//TFT �����õ� //TFT �����õ�
if(UP_VSYNC) if(UP_VSYNC)
......
...@@ -103,7 +103,7 @@ unsigned int g_RPM_Val; ...@@ -103,7 +103,7 @@ unsigned int g_RPM_Val;
uint8_t corenum[100]; uint8_t corenum[100];
uint8_t corenum1[100]; uint8_t corenum1[100];
uint8_t corenum2[100]; uint8_t corenum2[100];
uint8_t SCnum = 0;
...@@ -1516,6 +1516,7 @@ void CompilationDate_S(uint16_t uiStartX,uint16_t uiDspLine) ...@@ -1516,6 +1516,7 @@ void CompilationDate_S(uint16_t uiStartX,uint16_t uiDspLine)
DspOneLineDynamicStr(uiDspInfo, uiStartX, uiDspLine); DspOneLineDynamicStr(uiDspInfo, uiStartX, uiDspLine);
} }
void DisplayStaticCurrent_S(uint16_t uiStartX,uint16_t uiDspLine) void DisplayStaticCurrent_S(uint16_t uiStartX,uint16_t uiDspLine)
{ {
uint8_t uiDspInfo[16+1]; uint8_t uiDspInfo[16+1];
...@@ -3033,6 +3034,16 @@ void HJ_OtherDisplay() ...@@ -3033,6 +3034,16 @@ void HJ_OtherDisplay()
{ {
case 0: case 0:
AUTO_Display(); AUTO_Display();
if(SCnum == 1)
{
SCnum = 0;
}
else
{
SCnum = 1;
}
Port_SetPortPinLevel(1, 21, PortGpioHigh); //stb
Port_SetPortPinLevel(1, 15, PortGpioHigh); //stb
break; break;
case 1: case 1:
//SetDisplayStaticItemW2(HJ_rightlight , 90, 225, DRAW_LUMIN_ICOM_WINDOW); //SetDisplayStaticItemW2(HJ_rightlight , 90, 225, DRAW_LUMIN_ICOM_WINDOW);
...@@ -3044,6 +3055,8 @@ void HJ_OtherDisplay() ...@@ -3044,6 +3055,8 @@ void HJ_OtherDisplay()
SetDisplayStaticItemW2(YD_dianliangdi, 20, 240, DRAW_LUMIN_ICOM_WINDOW);//灯全灭 SetDisplayStaticItemW2(YD_dianliangdi, 20, 240, DRAW_LUMIN_ICOM_WINDOW);//灯全灭
SetDisplayStaticItemW2(YD_READY, 70, 240, DRAW_LUMIN_ICOM_WINDOW);//灯全灭 SetDisplayStaticItemW2(YD_READY, 70, 240, DRAW_LUMIN_ICOM_WINDOW);//灯全灭
SetDisplayStaticItemW2(YD_jinguang, 150, 240, DRAW_LUMIN_ICOM_WINDOW);//灯全灭 SetDisplayStaticItemW2(YD_jinguang, 150, 240, DRAW_LUMIN_ICOM_WINDOW);//灯全灭
Port_SetPortPinLevel(1, 21, PortGpioHigh); //stb
Port_SetPortPinLevel(1, 15, PortGpioHigh); //stb
// sprintf(uiDspInfoled,"POWERlow;READY;",HJ_CurFuelNum); // sprintf(uiDspInfoled,"POWERlow;READY;",HJ_CurFuelNum);
// DspOneLineDynamicStr(uiDspInfoled, 20, 240); // DspOneLineDynamicStr(uiDspInfoled, 20, 240);
// sprintf(uiDspInfoled,"Lowbeam",HJ_CurFuelNum); // sprintf(uiDspInfoled,"Lowbeam",HJ_CurFuelNum);
...@@ -3150,6 +3163,16 @@ void HJ_OtherDisplay() ...@@ -3150,6 +3163,16 @@ void HJ_OtherDisplay()
case 10: case 10:
sprintf(uiDspInfoTime,"Time: 19:09",HJ_CurFuelNum); sprintf(uiDspInfoTime,"Time: 19:09",HJ_CurFuelNum);
SetDisplayStaticItemW2( HJ_Alllight, 20, 240, DRAW_LUMIN_ICOM_WINDOW); SetDisplayStaticItemW2( HJ_Alllight, 20, 240, DRAW_LUMIN_ICOM_WINDOW);
Port_SetPortPinLevel(1, 21, PortGpioHigh); //stb
Port_SetPortPinLevel(1, 15, PortGpioHigh); //stb
if(SCnum == 1)
{
SCnum = 0;
}
else
{
SCnum = 1;
}
// SetDisplayStaticItemW2(, 90, 225, DRAW_LUMIN_ICOM_WINDOW); // SetDisplayStaticItemW2(, 90, 225, DRAW_LUMIN_ICOM_WINDOW);
break; break;
...@@ -3242,9 +3265,13 @@ void UpdateCenterTripC(void) ...@@ -3242,9 +3265,13 @@ void UpdateCenterTripC(void)
break; break;
case STAGE_AutoCheck: //�Լ� case STAGE_AutoCheck: //�Լ�
// AUTO_Display(); // AUTO_Display();
DspOneLineDynamicStr(corenum ,0, 70); if(zhenduansendStep == 4)
DspOneLineDynamicStr(corenum1 ,0, 90); {
DspOneLineDynamicStr(corenum2 ,0, 110); DspOneLineDynamicStr(corenum ,0, 70);
DspOneLineDynamicStr(corenum1 ,0, 90);
DspOneLineDynamicStr(corenum2 ,0, 110);
}
break; break;
case STAGE_Led_Telltale_Check: //双闪 case STAGE_Led_Telltale_Check: //双闪
......
...@@ -429,7 +429,7 @@ void HJ_LED(en_port_gpio_level_t LedState) ...@@ -429,7 +429,7 @@ void HJ_LED(en_port_gpio_level_t LedState)
//Port_SetPortPinLevel(2, 0, PortGpioHigh); //Port_SetPortPinLevel(2, 0, PortGpioHigh);
// Port_SetPortPinLevel(2, 14, PortGpioHigh); // Port_SetPortPinLevel(2, 14, PortGpioHigh);
//Speed_Output_Update(PWMCH_SPEED_OUT, 1910, 50); //Speed_Output_Update(PWMCH_SPEED_OUT, 1910, 50);
Port_SetPortPinLevel(1, 21, PortGpioHigh);//测试 // Port_SetPortPinLevel(1, 21, PortGpioHigh);//测试
break; break;
case 3: case 3:
......
...@@ -521,7 +521,9 @@ void Button_Statu_Manage(void) ...@@ -521,7 +521,9 @@ void Button_Statu_Manage(void)
{ {
zhenduanflag = 0; zhenduanflag = 0;
zhenduansendStep = 0; zhenduansendStep = 0;
g_Stage = 2;
// zhenduanflag = 0; // zhenduanflag = 0;
// RS485_TX_finish = 0; // RS485_TX_finish = 0;
} }
else else
...@@ -589,6 +591,8 @@ void Button_Statu_Manage(void) ...@@ -589,6 +591,8 @@ void Button_Statu_Manage(void)
Botton.EOL.Statu = 1; Botton.EOL.Statu = 1;
Button_Press= 1; Button_Press= 1;
Button_Value=13; Button_Value=13;
clearodoflag = 1;
// zhenduanflag = 0xFF;
} }
Botton.EOL.Time = 0; Botton.EOL.Time = 0;
} }
...@@ -829,7 +833,7 @@ void Button_Statu_Manage(void) ...@@ -829,7 +833,7 @@ void Button_Statu_Manage(void)
if(Botton.End.Time > 50) if(Botton.End.Time > 50)
{ {
Botton.End.Time = 51; Botton.End.Time = 51;
Port_SetPortPinLevel(1, 21, PortGpioHigh); // Port_SetPortPinLevel(1, 21, PortGpioHigh);
} }
} }
else { else {
...@@ -837,7 +841,7 @@ void Button_Statu_Manage(void) ...@@ -837,7 +841,7 @@ void Button_Statu_Manage(void)
if(Botton.End.Time > 100) if(Botton.End.Time > 100)
{ {
Botton.End.Time = 0; Botton.End.Time = 0;
Port_SetPortPinLevel(1, 21, PortGpioLow); // Port_SetPortPinLevel(1, 21, PortGpioLow);
} }
} }
...@@ -2548,7 +2552,7 @@ void Stage_Manage() ...@@ -2548,7 +2552,7 @@ void Stage_Manage()
#if (SEMI_AUTOMATIC_STAGE) #if (SEMI_AUTOMATIC_STAGE)
UserPressKey15();//KL15���� UserPressKey15();//KL15����
#else #else
UserPressKey15();//KL15���� // UserPressKey15();//KL15����
#endif #endif
} }
...@@ -2566,8 +2570,8 @@ void Stage_Manage() ...@@ -2566,8 +2570,8 @@ void Stage_Manage()
#else #else
// UserPressEOL();//�������� // UserPressEOL();//��������
g_Stage = STAGE_Other; // g_Stage = STAGE_Other;
clearodoflag = 1;
ClearOtherSWFlagFun(); ClearOtherSWFlagFun();
ClearOtherFlagFun(); ClearOtherFlagFun();
Othercount = 0; Othercount = 0;
......
...@@ -235,7 +235,7 @@ void SMC_Drive_Init(stc_motor_t *motorConfig,uint8_t cycle_width,uint8_t clkdiv) ...@@ -235,7 +235,7 @@ void SMC_Drive_Init(stc_motor_t *motorConfig,uint8_t cycle_width,uint8_t clkdiv)
.enGpioDirection = PortGpioOutput, .enGpioDirection = PortGpioOutput,
.enGpioInitOutputLevel = PortGpioLow .enGpioInitOutputLevel = PortGpioLow
}; };
Port_SetPinConfig( 1, 21, &stc_port_pin_config1_21 ); // Port_SetPinConfig( 1, 21, &stc_port_pin_config1_21 );
// //
m_stc_smc.unPWC.u16Register = 0; m_stc_smc.unPWC.u16Register = 0;
......
...@@ -1002,7 +1002,7 @@ en_result_t Mfs_Uart_Read(pstc_uart_type_t pstcUart, ...@@ -1002,7 +1002,7 @@ en_result_t Mfs_Uart_Read(pstc_uart_type_t pstcUart,
} }
/* Call wait loop hook */ /* Call wait loop hook */
PDL_WAIT_LOOP_HOOK(); // PDL_WAIT_LOOP_HOOK();
} }
return Ok; return Ok;
......
This diff is collapsed.
...@@ -134,4 +134,6 @@ extern uint8_t Linestep; ...@@ -134,4 +134,6 @@ extern uint8_t Linestep;
extern uint8_t lineNum; extern uint8_t lineNum;
extern uint8_t linewrong; extern uint8_t linewrong;
extern uint8_t powerwrong; extern uint8_t powerwrong;
extern uint8_t clearodoflag;
extern uint32_t clearodotime;
#endif /* __MAIN_H__ */ #endif /* __MAIN_H__ */
...@@ -67,7 +67,7 @@ void NM_D_Init(uint8_t state) ...@@ -67,7 +67,7 @@ void NM_D_Init(uint8_t state)
Port_SetPinConfig( 1, 22, &stc_port_pin_config_out ); Port_SetPinConfig( 1, 22, &stc_port_pin_config_out );
//en //en
stc_port_pin_config_out.enGpioInitOutputLevel = PortGpioHigh; stc_port_pin_config_out.enGpioInitOutputLevel = PortGpioHigh;
Port_SetPinConfig( 1, 21, &stc_port_pin_config_out ); // Port_SetPinConfig( 1, 21, &stc_port_pin_config_out );
#endif #endif
#if (CAN_3RD) #if (CAN_3RD)
stc_port_pin_config_out.enGpioInitOutputLevel = PortGpioLow; stc_port_pin_config_out.enGpioInitOutputLevel = PortGpioLow;
...@@ -76,7 +76,7 @@ void NM_D_Init(uint8_t state) ...@@ -76,7 +76,7 @@ void NM_D_Init(uint8_t state)
//stc_port_pin_config_out.enGpioInitOutputLevel = PortGpioHigh; //stc_port_pin_config_out.enGpioInitOutputLevel = PortGpioHigh;
//Port_SetPinConfig( 1, 21, &stc_port_pin_config_out ); //Port_SetPinConfig( 1, 21, &stc_port_pin_config_out );
#endif #endif
bsp_CAN1_Init(); // bsp_CAN1_Init();
break; break;
case BusSleep: case BusSleep:
bsp_tx_msgbuf_abort( 1 ); bsp_tx_msgbuf_abort( 1 );
......
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