Commit 4c1c007a authored by 何锐's avatar 何锐

feat:添加静态电流并放在第一步

parent eb02050a
......@@ -69,7 +69,7 @@ void Function_Check_Ctrl(uint32_t cmd);
void MENU_CHECK_STEP_ADD(void)
{
if(MENU_CHECK_STEP >= 15)
if(MENU_CHECK_STEP >= 16)
{
MENU_CHECK_STEP = 0;
}
......@@ -608,6 +608,8 @@ void Function_Check_Ctrl(uint32_t cmd)
FUEL_RES_3 = 0;
FUEL_RES_4 = 0;
POWER_CTRL_KL30 = 1u; //B+
POWER_CTRL_KL15 = 1u; //KL15
break;
}
case 2:
......@@ -724,7 +726,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_POS_05 = 0;
LINE_OUT_POS_06 = 1;
LINE_OUT_POS_07 = 0;
LINE_OUT_POS_08 = 0;
LINE_OUT_POS_08 = 1;
/*燃油*/
FUEL_RES_1 = 0;
FUEL_RES_2 = 2;
......@@ -775,7 +777,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_POS_05 = 0;
LINE_OUT_POS_06 = 1;
LINE_OUT_POS_07 = 0;
LINE_OUT_POS_08 = 1;
LINE_OUT_POS_08 = 0;
/*燃油*/
FUEL_RES_1 = 0;
FUEL_RES_2 = 2;
......@@ -851,6 +853,26 @@ void Function_Check_Ctrl(uint32_t cmd)
FUEL_RES_4 = 0;
break;
}
case 16:
{
LINE_OUT_POS_01 = 0;
LINE_OUT_POS_02 = 0;
LINE_OUT_POS_03 = 0;
LINE_OUT_POS_04 = 0;
LINE_OUT_POS_05 = 0;
LINE_OUT_POS_06 = 1;
LINE_OUT_POS_07 = 0;
LINE_OUT_POS_08 = 0;
/*燃油*/
FUEL_RES_1 = 0;
FUEL_RES_2 = 0;
FUEL_RES_3 = 0;
FUEL_RES_4 = 0;
POWER_CTRL_KL30 = 0u; //B+
POWER_CTRL_KL15 = 0u; //KL15
break;
}
}
}
}
......
......@@ -4441,7 +4441,7 @@ void Get_static_Current(void)
{
static uint32_t loc_Timer = 0;
static uint32_t loc_ret = 0;
if(MENU_CHECK_STEP == 11)
if(MENU_CHECK_STEP == 16)
{
loc_Current_0 = ADC_Read_Signal(ADC_CH_KL15_VOLTAGE);
loc_ret += loc_Current_0;
......@@ -4474,7 +4474,7 @@ void Get_static_Current(void)
}
else
{
MENU_CHECK_STEP = 11;
MENU_CHECK_STEP = 16;
// CurrentWrong = 1;
}
}
......@@ -5034,7 +5034,7 @@ void Display_Send_Vspead(uint8_t menu)
Type_Clear = menu;
Display_TFT_Clear();
}
if(menu > 0)
if((menu > 0) && (menu < 16))
{
TFT_LCD_Draw_Bmp(3, 40, ( uint8_t * )gImage_04X0_Y0);//车速
TFT_LCD_Draw_Bmp(3, 80, ( uint8_t * )gImage_04X0_Y0);//转速
......@@ -5126,6 +5126,10 @@ void Display_Send_Vspead(uint8_t menu)
}
}
else if(menu == 16)
{
TFT_LCD_Draw_Bmp(3, 60, ( uint8_t * )gImage_Dyy_words_5X6_Y137);
}
......
......@@ -126,7 +126,28 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
/*清零ODO*/
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
MENU_CHECK_STEP_ADD( );
// MENU_CHECK_STEP_ADD( );
// if(MENU_CHECK_STEP >= 16)
// {
// MENU_CHECK_STEP = 0;
// }
// else
// {
// MENU_CHECK_STEP++;
// }
if(MENU_CHECK_STEP == 0)
{
MENU_CHECK_STEP = 16;
}
else if(MENU_CHECK_STEP == 16)
{
MENU_CHECK_STEP = 1;
}
else
{
MENU_CHECK_STEP++;
}
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{
......
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