Commit 7f7f4604 authored by 何锐's avatar 何锐

feat:固定485信号 :电池电量、车速、母线电流、母线电压。屏幕亮度最大

parent f39181a0
...@@ -4887,24 +4887,24 @@ void Display_Version_Info(uint32_t ON_OFF) ...@@ -4887,24 +4887,24 @@ void Display_Version_Info(uint32_t ON_OFF)
TFT_LCD_Draw_Bmp(3, 90+25+25+30+25+30+30+5, ( uint8_t * )gImage_gImage_SV1X6_Y16 ); //软件版本号对比 // TFT_LCD_Draw_Bmp(3, 90+25+25+30+25+30+30+5, ( uint8_t * )gImage_gImage_SV1X6_Y16 ); //软件版本号对比
if((puranhoumian + houmian7926 + houmian7106) != 0) // if((puranhoumian + houmian7926 + houmian7106) != 0)
{ // {
jiaoyan = 2; // jiaoyan = 2;
if((puranhoumian == nowpuran) && (houmian7926 == now7926) && (houmian7106 == now7106) && \ // if((puranhoumian == nowpuran) && (houmian7926 == now7926) && (houmian7106 == now7106) && \
((R485_IDB4h.Sig.PY32F072_APP_PV == 1) && (R485_IDB4h.Sig.JL7926_APP_PV == 1) && (R485_IDB4h.Sig.JL7106_APP_PV == 1))) // ((R485_IDB4h.Sig.PY32F072_APP_PV == 1) && (R485_IDB4h.Sig.JL7926_APP_PV == 1) && (R485_IDB4h.Sig.JL7106_APP_PV == 1)))
{ // {
TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30+30, ( uint8_t * )gImage_dui ); //软件版本号对比 对 // TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30+30, ( uint8_t * )gImage_dui ); //软件版本号对比 对
jiaoyan = 1; // jiaoyan = 1;
} // }
else // else
{ // {
TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30+30, ( uint8_t * )gImage_cuo ); //软件版本号对比 错 // TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30+30, ( uint8_t * )gImage_cuo ); //软件版本号对比 错
//正在调试取消版本号对比 想要取消版本号对比将上方注释掉并解开下方注释即可 // //正在调试取消版本号对比 想要取消版本号对比将上方注释掉并解开下方注释即可
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30+30, ( uint8_t * )gImage_dui ); //软件版本号对比 对 // // TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30+30, ( uint8_t * )gImage_dui ); //软件版本号对比 对
// firstpowerflag = 2; // // firstpowerflag = 2;
} // }
} // }
...@@ -4925,7 +4925,7 @@ void Display_Version_Info(uint32_t ON_OFF) ...@@ -4925,7 +4925,7 @@ void Display_Version_Info(uint32_t ON_OFF)
// TFT_LCD_Draw_Bmp(3, 160, ( uint8_t * )gImage_Alarm_12_WordX6_Y165); //24脚输出占空比 // TFT_LCD_Draw_Bmp(3, 160, ( uint8_t * )gImage_Alarm_12_WordX6_Y165); //24脚输出占空比
// TFT_LCD_Draw_Bmp(210, 160, ( uint8_t * )gImage_Alarm_13_ImageX222_Y166); //% // TFT_LCD_Draw_Bmp(210, 160, ( uint8_t * )gImage_Alarm_13_ImageX222_Y166); //%
TFT_LCD_Draw_Bmp(3, 290, ( uint8_t * )gImage_gImage_checkVX6_Y165 ); //检测台版本号 TFT_LCD_Draw_Bmp(3, 290, ( uint8_t * )gImage_gImage_checkVX6_Y165 ); //检测台版本号
uint8_t mbuff [7] = {2,6,0,1,1,5,0xff}; uint8_t mbuff [7] = {2,6,0,1,2,3,0xff};
General_Number_Disp(mbuff, 160, 290); General_Number_Disp(mbuff, 160, 290);
} }
......
...@@ -11,36 +11,36 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent) //下一步 ...@@ -11,36 +11,36 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent) //下一步
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if(firstpowerflag == 2) // if(firstpowerflag == 2)
{ // {
if(saomafinish == 3) // if(saomafinish == 3)
{ // {
zhenduansendStep = 0; // zhenduansendStep = 0;
zhenduanflag = Data_Mode_Dot; // zhenduanflag = Data_Mode_Dot;
memset(erweima, 0, 64); // memset(erweima, 0, 64);
memset(barcode_Msg, 0, 64); // memset(barcode_Msg, 0, 64);
saomafinish = 4; // saomafinish = 4;
} // }
else if(saomafinish == 4) // else if(saomafinish == 4)
{ // {
MENU_CHECK_STEP_ADD( ); // MENU_CHECK_STEP_ADD( );
} // }
} // }
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
if(firstpowerflag == 2) // if(firstpowerflag == 2)
{ // {
if(AutoFlag == 1) // if(AutoFlag == 1)
{ // {
AutoFlag = 0; // AutoFlag = 0;
} // }
else // else
{ // {
AutoFlag = 1; // AutoFlag = 1;
} // }
} // }
} }
else else
{ {
...@@ -50,10 +50,10 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent) //上一步 ...@@ -50,10 +50,10 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent) //上一步
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if(firstpowerflag == 2) // if(firstpowerflag == 2)
{ // {
MENU_CHECK_STEP_SUB(); // MENU_CHECK_STEP_SUB();
} // }
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
...@@ -81,20 +81,20 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent) ...@@ -81,20 +81,20 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if(firstpowerflag == 2) // if(firstpowerflag == 2)
{ // {
if(zhenduanflag == Data_Mode_Write) // if(zhenduanflag == Data_Mode_Write)
{ // {
if(saomafinish == 1) // if(saomafinish == 1)
{ // {
zhenduansendStep = 5; // zhenduansendStep = 5;
} // }
} // }
else if(((zhenduansendStep == 4) && (zhenduanflag == Data_Mode_Read))) // else if(((zhenduansendStep == 4) && (zhenduanflag == Data_Mode_Read)))
{ // {
zhenduansendStep = 5; // zhenduansendStep = 5;
} // }
} // }
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
...@@ -110,9 +110,9 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent) ...@@ -110,9 +110,9 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
zhenduanflag = Data_Mode_Write; // zhenduanflag = Data_Mode_Write;
zhenduansendStep = 0; // zhenduansendStep = 0;
saomafinish = 0; // saomafinish = 0;
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
...@@ -128,13 +128,13 @@ void Key_Operation_SW9(Key_Event_en_t enKeyEvent) ...@@ -128,13 +128,13 @@ void Key_Operation_SW9(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) //下移位 if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) //下移位
{ {
downkeyflag = 1; // downkeyflag = 1;
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) //P2P模式 else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) //P2P模式
{ {
OTAMode = 2; // OTAMode = 2;
name1 = (devicename) & 0xFF; // name1 = (devicename) & 0xFF;
name2 = (devicename >> 8) & 0xFF; // name2 = (devicename >> 8) & 0xFF;
} }
else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
{ {
...@@ -147,21 +147,21 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent) ...@@ -147,21 +147,21 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if(LINE_OUT_NEG_04 == 1U) //上下ACC电 // if(LINE_OUT_NEG_04 == 1U) //上下ACC电
{ // {
LINE_OUT_NEG_04 = 0U; // LINE_OUT_NEG_04 = 0U;
Auto_ONOFF = 3; // Auto_ONOFF = 3;
} // }
else // else
{ // {
LINE_OUT_NEG_04 = 1U; // LINE_OUT_NEG_04 = 1U;
Auto_ONOFF = 0; // Auto_ONOFF = 0;
} // }
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
Auto_ONOFF = 1; //自动断电 // Auto_ONOFF = 1; //自动断电
LINE_OUT_NEG_04 = 0U; // LINE_OUT_NEG_04 = 0U;
} }
else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
{ {
...@@ -174,27 +174,27 @@ void Key_Operation_SW3(Key_Event_en_t enKeyEvent) ...@@ -174,27 +174,27 @@ void Key_Operation_SW3(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if(firstpowerflag == 2) // if(firstpowerflag == 2)
{ // {
if(clearOdoFlag == 0) // if(clearOdoFlag == 0)
{ // {
clearOdoFlag = 1; // clearOdoFlag = 1;
} // }
else // else
{ // {
queren = 1; // queren = 1;
} // }
} // }
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
} }
else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
{ {
if(Get_Display_Type( ) == 2) // if(Get_Display_Type( ) == 2)
{ // {
MENU_CHECK_STEP_SUB( ); // MENU_CHECK_STEP_SUB( );
} // }
} }
else else
{ {
...@@ -204,13 +204,13 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent) ...@@ -204,13 +204,13 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) //上移位 if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) //上移位
{ {
upkeyflag = 1; // upkeyflag = 1;
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) //AP模式 else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) //AP模式
{ {
OTAMode = 1; // OTAMode = 1;
name1 = (devicename) & 0xFF; // name1 = (devicename) & 0xFF;
name2 = (devicename >> 8) & 0xFF; // name2 = (devicename >> 8) & 0xFF;
} }
else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
{ {
...@@ -226,19 +226,19 @@ void Key_Operation_SW6(Key_Event_en_t enKeyEvent) ...@@ -226,19 +226,19 @@ void Key_Operation_SW6(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
Confirmkeyflag = 1; // Confirmkeyflag = 1;
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
if(menumondel == 0) // if(menumondel == 0)
{ // {
menumondel = 1; // menumondel = 1;
Display_TFT_Clear(); // Display_TFT_Clear();
} // }
else // else
{ // {
menumondel = 0; // menumondel = 0;
} // }
} }
else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
{ {
......
...@@ -119,8 +119,8 @@ uint32_t R485_Send_0xD1(void) ...@@ -119,8 +119,8 @@ uint32_t R485_Send_0xD1(void)
switch (MENU_CHECK_STEP) switch (MENU_CHECK_STEP)
{ {
case 0: case 0:
R485_IDD1h.Sig.MainBatteryQuantity = 0x00; //电量 R485_IDD1h.Sig.MainBatteryQuantity = 0xA0; //电量
R485_IDD1h.Sig.BatteryChargingStatus = 0x01; //充电枪 // R485_IDD1h.Sig.BatteryChargingStatus = 0x01; //充电枪
break; break;
case 1: case 1:
...@@ -246,13 +246,15 @@ uint32_t R485_Send_0xD2(void) ...@@ -246,13 +246,15 @@ uint32_t R485_Send_0xD2(void)
switch (MENU_CHECK_STEP) switch (MENU_CHECK_STEP)
{ {
case 0: case 0:
R485_IDD2h.Sig.ICMCalculatesVehicleSpeed_L = 0x00; R485_IDD2h.Sig.ICMCalculatesVehicleSpeed_L = 0xC8;
R485_IDD2h.Sig.ICMCalculatesVehicleSpeed_H = 0x00; //车速00 R485_IDD2h.Sig.ICMCalculatesVehicleSpeed_H = 0x00;
R485_IDD2h.Sig.BusbarVoltage = 0x05; R485_IDD2h.Sig.BusbarVoltage = 0x14;
R485_IDD2h.Sig.BusbarCurrent = 0x3A; //功率 R485_IDD2h.Sig.BusbarCurrent = 0x1E;
R485_IDD2h.Sig.SpeedGear = 0x01;
R485_IDD2h.Sig.ParkinFeedback = 0x01; //ready灯熄灭 R485_IDD2h.Sig.RecuperationStatusFeedback = 0x01;
break; break;
case 1: case 1:
...@@ -519,6 +521,11 @@ uint32_t R485_Send_0xD3(void) ...@@ -519,6 +521,11 @@ uint32_t R485_Send_0xD3(void)
switch (MENU_CHECK_STEP) switch (MENU_CHECK_STEP)
{ {
case 0:
R485_IDD3h.Sig.ManualAdjBacklightSet = 0x01;
R485_IDD3h.Sig.BackLightValueSet = 100;
break;
case 2: case 2:
// R485_IDD3h.Sig.AutoheadLightSetting = 0x00; //自动大灯 // R485_IDD3h.Sig.AutoheadLightSetting = 0x00; //自动大灯
R485_IDD3h.Sig.ElectronicCushionStatus = 0x01; //座桶开启灯 R485_IDD3h.Sig.ElectronicCushionStatus = 0x01; //座桶开启灯
......
...@@ -88,7 +88,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void) ...@@ -88,7 +88,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
TX_RX_485_service(); TX_RX_485_service();
if(Version_number_begin == 0) if(Version_number_begin == 0)
{ {
EnterVersionNumber(); // EnterVersionNumber();
} }
} }
/*============================================================================== /*==============================================================================
......
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