Commit 05dd5b3b authored by 何锐's avatar 何锐

feat:检测台初版、无贴图

parent 8e08c347
...@@ -110,138 +110,136 @@ void CAN_Service(void) ...@@ -110,138 +110,136 @@ void CAN_Service(void)
{ {
init_CAN_Frame(&m_msg2, CAN_ID_2, 8, 0, data2); init_CAN_Frame(&m_msg2, CAN_ID_2, 8, 0, data2);
init_CAN_Frame(&m_msg3, CAN_ID_3, 8, 0, data3); init_CAN_Frame(&m_msg3, CAN_ID_3, 8, 0, data3);
init_CAN_Frame(&m_msg4, CAN_ID_4, 8, 1, data4); // init_CAN_Frame(&m_msg4, CAN_ID_4, 8, 1, data4);
init_CAN_Frame(&m_msg5, CAN_ID_5, 8, 0, data5); init_CAN_Frame(&m_msg5, CAN_ID_5, 8, 0, data5);
// init_CAN_Frame(&m_msg6, CAN_ID_6, 8, 0, data6); // init_CAN_Frame(&m_msg6, CAN_ID_6, 8, 0, data6);
can_mid(m_msg2); can_mid(m_msg2);
can_mid(m_msg3); can_mid(m_msg3);
can_mid(m_msg4); // can_mid(m_msg4);
can_mid(m_msg5); can_mid(m_msg5);
// can_mid(m_msg6); // can_mid(m_msg6);
} }
} }
uint8_t repower;
uint8_t MENU_CHECK_STEP_LAST;
void can_submit(void) void can_submit(void)
{ {
if ((MENU_CHECK_STEP >= 8) && (MENU_CHECK_STEP <= 15) && (MENU_CHECK_STEP_LAST != MENU_CHECK_STEP))
{
if (repower <= 100)
{
repower++;
POWER_CTRL_KL30 = 0u;
POWER_CTRL_KL15 = 0u;
}
else
{
repower = 0u;
POWER_CTRL_KL30 = 1u;
POWER_CTRL_KL15 = 1u;
MENU_CHECK_STEP_LAST = MENU_CHECK_STEP;
}
}
switch (MENU_CHECK_STEP) switch (MENU_CHECK_STEP)
{ {
case 0: case 0:
data2[1] = 0x00; //水温
data3[4] = 0x00;
data3[5] = 0x00;
data4[0] = 0x00;
data5[1] = 0x00;
data5[2] = 0x00; data5[2] = 0x00;
data5[3] = 0x00; //N字不显示 data5[3] = 0x00; //N字不显示
data5[4] = 0x00;
data5[5] = 0x00; //主题土星
break; break;
case 1: case 1:
data2[1] = 0x00; //水温
data3[4] = 0x00;
data3[5] = 0x00;
data4[0] = 0x00;
data5[1] = 0x01;
data5[2] = 0x54; data5[2] = 0x54;
data5[3] = 0x08; //N字显示,旋转85° data5[3] = 0x09; //N字显示,旋转85°
data5[4] = 0x00;
data5[5] = 0x01; //主题火星
break; break;
case 2: case 2:
data2[1] = 0x5A;
data3[4] = 0xE8;
data3[5] = 0x03;
data4[0] = 0x00;
data5[1] = 0x02;
data5[2] = 0xE4; data5[2] = 0xE4;
data5[3] = 0x08; //N字显示,旋转185° data5[3] = 0x0A; //N字显示,旋转185°
data5[4] = 0x00;
data5[5] = 0x02; //主题月球
break; break;
case 3: case 3:
data2[1] = 0xAA;
data3[4] = 0xE8;
data3[5] = 0x03;
data4[0] = 0x00;
data5[1] = 0x04;
data5[2] = 0x48; data5[2] = 0x48;
data5[3] = 0x08; //N字显示,旋转274° data5[3] = 0x0C; //N字显示,旋转274°
data5[4] = 0x00;
data5[5] = 0x02; //主题月球
break; break;
case 4: case 4:
data2[1] = 0xAA;
data3[4] = 0xE8;
data3[5] = 0x03;
data4[0] = 0x00;
data5[1] = 0x05;
data5[2] = 0x9C; data5[2] = 0x9C;
data5[3] = 0x08; //N字显示,旋转359° data5[3] = 0x0D; //N字显示,旋转359°
data5[4] = 0x00;
data5[5] = 0x02; //主题月球
break; break;
case 5: case 5:
data2[1] = 0x00; data5[2] = 0x00;
data5[3] = 0x20;
data3[4] = 0x00; data5[4] = 0x11; //纪念日
data3[5] = 0x00; data5[5] = 0x02; //主题月球
data4[0] = 0x01; //白灰
break; break;
case 6: case 6:
data2[1] = 0x00; data5[2] = 0x00;
data5[3] = 0x20;
data3[4] = 0x00; data5[4] = 0x21; //家
data3[5] = 0x00; data5[5] = 0x02; //主题月球
data4[0] = 0x02; //黑
break; break;
case 7: case 7:
data2[1] = 0x00; data5[2] = 0x00;
data5[3] = 0x20;
data3[4] = 0x00; data5[4] = 0x31; //对象
data3[5] = 0x00; data5[5] = 0x02; //主题月球
data4[0] = 0x03; //灰
break; break;
case 8: case 8:
data2[1] = 0x00; data5[2] = 0x00;
data5[3] = 0x00;
data3[4] = 0x00; data5[4] = 0x00;
data3[5] = 0x00; data5[5] = 0x08; //天气
data4[0] = 0x04; //白
break; break;
case 9: case 9:
data2[1] = 0x00; data5[2] = 0x00;
data5[3] = 0x00;
data3[4] = 0x00; data5[4] = 0x00;
data3[5] = 0x00; data5[5] = 0x10; //天气
data4[0] = 0x05; //红
break; break;
case 10: case 10:
data2[1] = 0x00; data5[2] = 0x00;
data5[3] = 0x00;
data3[4] = 0x00; data5[4] = 0x00;
data3[5] = 0x00; data5[5] = 0x18; //天气
data4[0] = 0x06; //绿
break; break;
case 11: case 11:
data2[1] = 0x00; data5[2] = 0x00;
data5[3] = 0x00;
data3[4] = 0x00; data5[4] = 0x00;
data3[5] = 0x00; data5[5] = 0x20; //天气
break;
data4[0] = 0x07; //蓝 case 12:
data5[2] = 0x00;
data5[3] = 0x00;
data5[4] = 0x00;
data5[5] = 0x28; //天气
break;
case 13:
data5[2] = 0x00;
data5[3] = 0x00;
data5[4] = 0x00;
data5[5] = 0x30; //天气
break;
case 14:
data5[2] = 0x00;
data5[3] = 0x00;
data5[4] = 0x00;
data5[5] = 0x38; //天气
break;
case 15:
data5[2] = 0x00;
data5[3] = 0x00;
data5[4] = 0x00;
data5[5] = 0x40; //天气
break; break;
default: default:
break; break;
......
...@@ -69,9 +69,9 @@ void Function_Check_Ctrl(uint32_t cmd); ...@@ -69,9 +69,9 @@ void Function_Check_Ctrl(uint32_t cmd);
void MENU_CHECK_STEP_ADD(void) void MENU_CHECK_STEP_ADD(void)
{ {
if(MENU_CHECK_STEP > 10) if(MENU_CHECK_STEP >= 15)
{ {
MENU_CHECK_STEP = 1; MENU_CHECK_STEP = 0;
} }
else else
{ {
......
...@@ -4155,46 +4155,46 @@ uint8_t CurrentWrong = 0; ...@@ -4155,46 +4155,46 @@ uint8_t CurrentWrong = 0;
uint16_t CurrentWrongfks = 0; uint16_t CurrentWrongfks = 0;
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 == 14)
{ // {
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;
loc_Timer++; // loc_Timer++;
if ( loc_Timer >= Sampling_NUM ) // if ( loc_Timer >= Sampling_NUM )
{ // {
loc_Timer = 0; // loc_Timer = 0;
loc_ret /= Sampling_NUM; // loc_ret /= Sampling_NUM;
// 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;//单位0.1毫安
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(190, 60, ( uint8_t * )gImage_Number_15_white_PiontX0_Y0);
GUI_General_Digit_Display(loc_ret1, Num_15, 3, 0, CurrentDigitNum09PosX, 60); // GUI_General_Digit_Display(loc_ret1, Num_15, 3, 0, CurrentDigitNum09PosX, 60);
// if(loc_ret1 > 10) // // if(loc_ret1 > 10)
// { // // {
// MENU_CHECK_STEP = 14; // // MENU_CHECK_STEP = 14;
// CurrentWrong = 1; // // CurrentWrong = 1;
// } // // }
// else // // else
// { // // {
// CurrentWrong = 0; // // CurrentWrong = 0;
// } // // }
loc_ret1 = 0; // loc_ret1 = 0;
} // }
else // else
{ // {
MENU_CHECK_STEP = 14; // MENU_CHECK_STEP = 14;
// CurrentWrong = 1; // // CurrentWrong = 1;
} // }
} // }
} }
void shouuid(void) void shouuid(void)
...@@ -4282,7 +4282,7 @@ void Display_Version_Info(uint32_t ON_OFF) ...@@ -4282,7 +4282,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 [10] = {2,0,2,6,97,0,3,1,5,0xff}; uint8_t mbuff [10] = {2,0,2,6,97,0,3,2,8,0xff};
General_Number_Disp(mbuff, 115, 200); //检测台版本号 General_Number_Disp(mbuff, 115, 200); //检测台版本号
// General_Number_Disp(UIDNumber, 85, 120); //固定UID数字 // General_Number_Disp(UIDNumber, 85, 120); //固定UID数字
// General_Number_Disp(UIDNumber2, 70, 146); //可调UID数字 // General_Number_Disp(UIDNumber2, 70, 146); //可调UID数字
...@@ -4762,9 +4762,9 @@ void Display_Send_Vspead(uint8_t menu) ...@@ -4762,9 +4762,9 @@ void Display_Send_Vspead(uint8_t menu)
// TFT_LCD_Draw_Bmp(3+18+18+18+18, 40+25, ( uint8_t * )NO_E); // TFT_LCD_Draw_Bmp(3+18+18+18+18, 40+25, ( uint8_t * )NO_E);
// TFT_LCD_Draw_Bmp(3+18+18+18+18+18, 40+25, ( uint8_t * )NO_D); // TFT_LCD_Draw_Bmp(3+18+18+18+18+18, 40+25, ( uint8_t * )NO_D);
// GUI_Display_Version_Code_Service(180, 40+25, "RPM", Letter_Num_11, PCodeText_Space_size); // GUI_Display_Version_Code_Service(180, 40+25, "RPM", Letter_Num_11, PCodeText_Space_size);
TFT_LCD_Draw_Bmp(3, 40+25+40, ( uint8_t * )gImage_WZ_word0_12X0_Y0);//燃油 // TFT_LCD_Draw_Bmp(3, 40+25+40, ( uint8_t * )gImage_WZ_word0_12X0_Y0);//燃油
TFT_LCD_Draw_Bmp(3, 40+25+40+25, ( uint8_t * )gImage_WZ_word0_11X0_Y0);//水温 // TFT_LCD_Draw_Bmp(3, 40+25+40+25, ( uint8_t * )gImage_WZ_word0_11X0_Y0);//水温
// TFT_LCD_Draw_Bmp(3, 40+25, ( uint8_t * )gImage_Dey_words_3X6_Y75);//剩余燃油量: // TFT_LCD_Draw_Bmp(3, 40+25, ( uint8_t * )gImage_Dey_words_3X6_Y75);//剩余燃油量:
// TFT_LCD_Draw_Bmp(180, 40+25, ( uint8_t * )gImage_Dey_words_8X224_Y107);//% // TFT_LCD_Draw_Bmp(180, 40+25, ( uint8_t * )gImage_Dey_words_8X224_Y107);//%
// TFT_LCD_Draw_Bmp(3, 40+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_checkComX6_Y165);//检 // TFT_LCD_Draw_Bmp(3, 40+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_checkComX6_Y165);//检
...@@ -5014,12 +5014,12 @@ void Display_Send_Vspead(uint8_t menu) ...@@ -5014,12 +5014,12 @@ void Display_Send_Vspead(uint8_t menu)
// GUI_General_Digit_Display(VSpeed_val, Num_15, 3, 2, ODODigitNum09PosX, 40); // GUI_General_Digit_Display(VSpeed_val, Num_15, 3, 2, ODODigitNum09PosX, 40);
// GUI_General_Digit_Display(ESpeed_val, Num_15, 5, 3, ODODigitNum09PosX,40+25); // GUI_General_Digit_Display(ESpeed_val, Num_15, 5, 3, ODODigitNum09PosX,40+25);
// GUI_General_Digit_Display(fuel_val, Num_15, 1, 0, ODODigitNum09PosX, 40+25+40); // GUI_General_Digit_Display(fuel_val, Num_15, 1, 0, ODODigitNum09PosX, 40+25+40);
GUI_General_Digit_Display(fuel_val, Num_15, 3, 2, ODODigitNum09PosX, 40+25+40); // GUI_General_Digit_Display(fuel_val, Num_15, 3, 2, ODODigitNum09PosX, 40+25+40);
GUI_General_Digit_Display(WaterTemp, Num_15, 3, 2, ODODigitNum09PosX, 40+25+40+25); // GUI_General_Digit_Display(WaterTemp, Num_15, 3, 2, ODODigitNum09PosX, 40+25+40+25);
if(menu > 0 && menu < 5) // if(menu > 0 && menu < 5)
{ // {
GUI_General_Digit_Display(Angle, Num_15, 3, 2, ODODigitNum09PosX, 40+25+40+25+25); // GUI_General_Digit_Display(Angle, Num_15, 3, 2, ODODigitNum09PosX, 40+25+40+25+25);
} // }
// General_Number_Disp(mbuffdfka, 135, 154); //时间 // General_Number_Disp(mbuffdfka, 135, 154); //时间
} }
......
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