Commit a5c6e9db authored by 何锐's avatar 何锐

feat:增加静态电流

parent c63c0ba9
...@@ -883,28 +883,8 @@ void Function_Check_Ctrl(uint32_t cmd) ...@@ -883,28 +883,8 @@ void Function_Check_Ctrl(uint32_t cmd)
} }
case 10: case 10:
{ {
// LINE_OUT_NEG_01 = 0; POWER_CTRL_KL30 = 0u; //B+
// LINE_OUT_NEG_02 = 0; POWER_CTRL_KL15 = 0u; //KL15
// LINE_OUT_NEG_03 = 0;
// LINE_OUT_NEG_04 = 0;
// LINE_OUT_NEG_05 = 0;
// LINE_OUT_NEG_06 = 0;
// LINE_OUT_NEG_07 = 0;
// LINE_OUT_NEG_08 = 0;
// LINE_OUT_NEG_09 = 0;
// LINE_OUT_NEG_10 = 0;
/*正控*/
// LINE_OUT_POS_01 = 1;
// LINE_OUT_POS_02 = 1;
// LINE_OUT_POS_04 = 1;
// LINE_OUT_NEG_01 = 1;
// /*燃油*/
// FUEL_RES_1 = 1; //1格
// FUEL_RES_2 = 0;
// FUEL_RES_3 = 0;
// FUEL_RES_4 = 0;
break; break;
} }
} }
......
...@@ -2745,7 +2745,19 @@ const unsigned char gImage_Number_09_white_pointX0_Y0[]={/*Byte Size14*/ ...@@ -2745,7 +2745,19 @@ const unsigned char gImage_Number_09_white_pointX0_Y0[]={/*Byte Size14*/
//静态电流
const unsigned char gImage_pic_06X0_Y0mA[]={/*Byte Size150*/
74U,16U,
0X00U,0X00U,0X44U,0X54U,0X54U,0X7fU,0X54U,0X44U,0X30U,0X28U,0X26U,0Xe4U,0X3cU,0X24U,0Xe0U,0X00U,
0X00U,0X00U,0X08U,0X08U,0X08U,0X88U,0X88U,0X68U,0X9cU,0X0aU,0X38U,0X48U,0X88U,0X08U,0X08U,0X08U,
0X08U,0X00U,0X00U,0XfcU,0X44U,0X44U,0X44U,0X44U,0XffU,0X44U,0X44U,0X44U,0X44U,0X44U,0XfcU,0X00U,
0X00U,0X20U,0X42U,0X44U,0X88U,0X00U,0X48U,0X48U,0Xa8U,0X98U,0X4eU,0X48U,0X48U,0X68U,0Xc8U,0X08U,
0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0X30U,0X20U,0X00U,0X00U,0X00U,0X00U,0XffU,0X15U,0X15U,
0X95U,0X7fU,0X01U,0X89U,0X89U,0X7fU,0X09U,0X09U,0X1fU,0X01U,0X00U,0X02U,0X31U,0X0dU,0X01U,0X3cU,
0X40U,0X40U,0X44U,0X45U,0X49U,0X40U,0X40U,0X31U,0X05U,0X39U,0X02U,0X00U,0X00U,0X0fU,0X04U,0X04U,
0X04U,0X04U,0X3fU,0X44U,0X44U,0X44U,0X44U,0X44U,0X47U,0X30U,0X00U,0X00U,0X60U,0X18U,0X04U,0X42U,
0X30U,0X0eU,0X00U,0X00U,0X3eU,0X00U,0X00U,0X3eU,0X40U,0X30U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,
0X00U,0X30U,0X20U,0X00U,};
const unsigned char gImage_Number_10_white3_0X0_Y0[]={/*Byte Size20*/ const unsigned char gImage_Number_10_white3_0X0_Y0[]={/*Byte Size20*/
9U,16U, 9U,16U,
0X00U,0Xe0U,0X18U,0X04U,0X04U,0X04U,0X18U,0Xe0U,0X00U,0X00U,0X07U,0X18U,0X20U,0X20U,0X20U,0X18U, 0X00U,0Xe0U,0X18U,0X04U,0X04U,0X04U,0X18U,0Xe0U,0X00U,0X00U,0X07U,0X18U,0X20U,0X20U,0X20U,0X18U,
...@@ -4794,12 +4806,14 @@ void HW_Static_Current_Check(uint32_t cmd) ...@@ -4794,12 +4806,14 @@ void HW_Static_Current_Check(uint32_t cmd)
} }
uint8_t CurrentWrong = 0; uint8_t CurrentWrong = 0;
uint16_t CurrentWrongfks = 0; uint16_t CurrentWrongfks = 0;
uint8_t loc_ret1_display[3];
uint8_t loc_ret1_display1[3];
void Get_static_Current(void) void Get_static_Current(void)
{ {
static uint32_t loc_Timer = 0; static uint32_t loc_Timer = 0;
static uint32_t loc_ret = 0; static uint32_t loc_ret = 0;
CurrentWrongfks = ADC_Read_Signal(ADC_CH_KL30_VOLTAGE); CurrentWrongfks = ADC_Read_Signal(ADC_CH_KL30_VOLTAGE);
if(MENU_CHECK_STEP == 14) if(MENU_CHECK_STEP == 10)
{ {
loc_Current_0 = ADC_Read_Signal(ADC_CH_KL15_VOLTAGE); loc_Current_0 = ADC_Read_Signal(ADC_CH_KL15_VOLTAGE);
loc_ret += loc_Current_0; loc_ret += loc_Current_0;
...@@ -4812,13 +4826,28 @@ void Get_static_Current(void) ...@@ -4812,13 +4826,28 @@ void Get_static_Current(void)
// loc_ret *= 1000;//单位0.001毫伏 // loc_ret *= 1000;//单位0.001毫伏
// loc_ret /= 100;//转化为电流,单位0.001毫安 // loc_ret /= 100;//转化为电流,单位0.001毫安
loc_ret /= 10;//单位0.1毫安 // loc_ret /= 10;//单位为毫安
loc_ret1 = loc_ret; loc_ret1 = loc_ret;
} }
if(loc_ret1 != 0) if(loc_ret1 != 0)
{ {
TFT_LCD_Draw_Bmp(190, 60, ( uint8_t * )gImage_Number_15_white_PiontX0_Y0); TFT_LCD_Draw_Bmp(3, 60, ( uint8_t * )gImage_pic_06X0_Y0mA);
GUI_General_Digit_Display(loc_ret1, Num_15, 3, 0, CurrentDigitNum09PosX, 60); // GUI_General_Digit_Display(loc_ret1, Num_15, 3, 0, CurrentDigitNum09PosX, 60);
loc_ret1_display[0] = loc_ret1 / 1000;
// loc_ret1 = loc_ret1 / 100;
// loc_ret1 = loc_ret1 % 10;
loc_ret1_display[1] = loc_ret1 / 100 % 10;
loc_ret1_display[2] = 0XFF;
loc_ret1_display1[0] = loc_ret1 / 10 % 10;
loc_ret1_display1[1] = loc_ret1 % 10;
loc_ret1_display1[2] = 0xff;
General_Number_Disp_No_Conver(loc_ret1_display, 100, 60);
General_Number_Disp_No_Conver(loc_ret1_display1, 130, 60);
TFT_LCD_Draw_Bmp(120, 52, ( uint8_t * )FONT_TABLE [ 37 ]);
// if(loc_ret1 > 10) // if(loc_ret1 > 10)
// { // {
// MENU_CHECK_STEP = 14; // MENU_CHECK_STEP = 14;
...@@ -4832,7 +4861,7 @@ void Get_static_Current(void) ...@@ -4832,7 +4861,7 @@ void Get_static_Current(void)
} }
else else
{ {
MENU_CHECK_STEP = 14; MENU_CHECK_STEP = 10;
// CurrentWrong = 1; // CurrentWrong = 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