Commit 9de7f272 authored by 梁百峰's avatar 梁百峰

feat:1225写入检验显示

parent ff202fcd
...@@ -32,7 +32,7 @@ uint8_t sendmsg[8]; ...@@ -32,7 +32,7 @@ uint8_t sendmsg[8];
uint8_t timenum = 0; uint8_t timenum = 0;
uint8_t firstflag = 0; uint8_t firstflag = 0;
uint8_t RS485_data[64]; uint8_t RS485_data[64];
uint8_t checknumwrong; uint8_t checknumwrong = 3;
uint8_t zhenduanflag = 0; uint8_t zhenduanflag = 0;
uint8_t clearOdoFlag = 0; uint8_t clearOdoFlag = 0;
uint8_t Auto_ONOFF = 0; uint8_t Auto_ONOFF = 0;
...@@ -40,7 +40,7 @@ uint32_t key_value; ...@@ -40,7 +40,7 @@ uint32_t key_value;
uint8_t key_array[4]; uint8_t key_array[4];
uint8_t seed_value[4]; uint8_t seed_value[4];
uint8_t zhenduansendStep = 0; uint8_t zhenduansendStep = 0;
uint8_t line_stdio = 0; uint8_t line_stdio = 2;
uint8_t powerstdio = 0; uint8_t powerstdio = 0;
uint8_t get_num_buf[34]; uint8_t get_num_buf[34];
uint8_t comparestart; uint8_t comparestart;
...@@ -118,41 +118,49 @@ void datacheck(void) ...@@ -118,41 +118,49 @@ void datacheck(void)
break; break;
case 1: case 1:
LineGetSta.ble1 = BarCode[7]; LineGetSta.ble1 = BarCode[7];
if(LineGetSta.ble1 == 0) if(LineGetSta.ble1 == 1)
{ {
line_stdio = 1; line_stdio = 1;
} }
break; break;
case 2: case 2:
LineGetSta.turnleft1 = BarCode[7]; LineGetSta.turnleft1 = BarCode[7];
if(LineGetSta.turnleft1 == 1)
{
line_stdio = 1;
}
break; break;
case 3: case 3:
LineGetSta.turnright1 = BarCode[7]; LineGetSta.turnright1 = BarCode[7];
if(LineGetSta.turnright1 == 1)
{
line_stdio = 1;
}
break; break;
case 4: case 4:
LineGetSta.ABSlight1 = BarCode[7]; LineGetSta.ABSlight1 = BarCode[7];
if(LineGetSta.ABSlight1 == 0) if(LineGetSta.ABSlight1 == 1)
{ {
line_stdio = 1; line_stdio = 1;
} }
break; break;
case 5: case 5:
LineGetSta.lowlight1 = BarCode[7]; LineGetSta.lowlight1 = BarCode[7];
if(LineGetSta.lowlight1 == 0) if(LineGetSta.lowlight1 == 1)
{ {
line_stdio = 1; line_stdio = 1;
} }
break; break;
case 6: case 6:
LineGetSta.highlight1 = BarCode[7]; LineGetSta.highlight1 = BarCode[7];
if(LineGetSta.highlight1 == 0) if(LineGetSta.highlight1 == 1)
{ {
line_stdio = 1; line_stdio = 1;
} }
break; break;
case 7: case 7:
LineGetSta.weizhilight1 = BarCode[7]; LineGetSta.weizhilight1 = BarCode[7];
if(LineGetSta.weizhilight1 == 0) if(LineGetSta.weizhilight1 == 1)
{ {
line_stdio = 1; line_stdio = 1;
} }
...@@ -170,10 +178,14 @@ void datacheck(void) ...@@ -170,10 +178,14 @@ void datacheck(void)
} }
else else
{ {
RS485_send_num--; // RS485_send_num--;
RS485_TX_finish = 0; RS485_TX_finish = 0;
} }
} }
else
{
RS485_TX_finish = 0;
}
} }
else if(zhenduanflag == 1) else if(zhenduanflag == 1)
{ {
...@@ -261,7 +273,7 @@ void datacheck(void) ...@@ -261,7 +273,7 @@ void datacheck(void)
} }
} }
} }
else else if(zhenduanflag == 2)
{ {
if(BarCode[0] == 0x59 && BarCode[1] == 0x44) if(BarCode[0] == 0x59 && BarCode[1] == 0x44)
{ {
...@@ -279,36 +291,47 @@ void datacheck(void) ...@@ -279,36 +291,47 @@ void datacheck(void)
memcpy(get_num_buf,BarCode+7,34 ); memcpy(get_num_buf,BarCode+7,34 );
comparestart = 1; comparestart = 1;
zhenduanflag = 3; zhenduanflag = 3;
} }
} }
} }
} }
} }
uint8_t cmpresult = 3;
void BarCodeDataGet(void) void BarCodeDataGet(void)
{ {
if((mDataBufPtr1[0] == 0x59) && (mDataBufPtr1[1] == 0x59)&&(mDataBufPtr1[39] != 0x0)) if((mDataBufPtr1[0] == 0x59) && (mDataBufPtr1[1] == 0x59)&&(mDataBufPtr1[39] != 0x0))
{ {
memcpy(barcode_Msg,&mDataBufPtr1[6],34); memcpy(barcode_Msg,&mDataBufPtr1[6],34);
memcpy(barcode_Msg1,&mDataBufPtr1[6],34);
}
else
{
memcpy(barcode_Msg1,&mDataBufPtr1[6],34);
} }
} }
uint8_t GetDataCompare(void) uint8_t GetDataCompare(void)
{ {
uint8_t result = 0;
for(int i = 0;i<34;i++) for(int i = 0;i<34;i++)
{ {
if(get_num_buf[i] == barcode_Msg[i] ) if(get_num_buf[i] == barcode_Msg1[i] )
{ {
result = 0; cmpresult = 0;
// u8compareresult = 0; // u8compareresult = 0;
} }
else else
{ {
result = 1; cmpresult = 1;
return cmpresult;
// u8compareresult = 1; // u8compareresult = 1;
} }
return result;
} }
return cmpresult;
} }
void UART_Put(uint32_t Value) void UART_Put(uint32_t Value)
{ {
...@@ -371,7 +394,7 @@ void Recv_Byte(void) ...@@ -371,7 +394,7 @@ void Recv_Byte(void)
{ {
for(i = 0; i < mDataBufLen; i++) for(i = 0; i < mDataBufLen; i++)
{ {
if(i > 4) if(i > 5)
{ {
if((mDataBufPtr[i] == 0x4A ) && (mDataBufPtr[i - 1] == 0x4B)) if((mDataBufPtr[i] == 0x4A ) && (mDataBufPtr[i - 1] == 0x4B))
{ {
...@@ -402,7 +425,6 @@ void Recv_Byte(void) ...@@ -402,7 +425,6 @@ void Recv_Byte(void)
// memcpy(nowdata,mDataBufPtr + len,len); // memcpy(nowdata,mDataBufPtr + len,len);
// datacheck(); // datacheck();
} }
// if()
mDataBufLen -= len; mDataBufLen -= len;
datacheck(); datacheck();
} }
...@@ -455,7 +477,10 @@ void Recv_Byte1(void) ...@@ -455,7 +477,10 @@ void Recv_Byte1(void)
int j = 0; int j = 0;
uint32_t len; uint32_t len;
readNum1 = Protocol_UartRead1(mDataBufPtr1 + mDataBufLen1, 1024 - mDataBufLen1); readNum1 = Protocol_UartRead1(mDataBufPtr1 + mDataBufLen1, 1024 - mDataBufLen1);
if (readNum1 > 0)
{
BarCodeDataGet(); BarCodeDataGet();
}
if (readNum1 > 0) if (readNum1 > 0)
{ {
mDataBufLen1 += readNum1; mDataBufLen1 += readNum1;
......
...@@ -8,11 +8,13 @@ ...@@ -8,11 +8,13 @@
#include "CAN_Communication_Matrix.h" #include "CAN_Communication_Matrix.h"
#include "COM_CAN.h" #include "COM_CAN.h"
#include "GenDelay.h" #include "GenDelay.h"
#include "TFT_LCD.h"
uint32_t NO_IPK_EXIST_Status; uint32_t NO_IPK_EXIST_Status;
uint32_t NO_IPK_EXIST; uint32_t NO_IPK_EXIST;
//uint32_t NO_IPK_EXIST_Back; //uint32_t NO_IPK_EXIST_Back;
uint32_t NO_IPK_EXIST_TIMER; uint32_t NO_IPK_EXIST_TIMER;
const unsigned char gImage_cuo12[] = {24, 24,0X00,0X00,0X00,0X00,0X30,0X70,0XE0,0XC0,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X80,0XC0,0X70,0X30,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0X83,0XC7,0X66,0X38,0X38,0X7C,0XE6,0XC3,0X81,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0C,0X0C,0X06,0X03,0X01,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0X03,0X07,0X0E,0X0C,0X00,0X00,0X00,0X00,};
const unsigned char gImage_dui12[] = {24, 24,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X80,0XC0,0XE0,0X40,0X00,0X00,0X00,0X00,0X08,0X18,0X30,0X70,0XC0,0X80,0X00,0X00,0X80,0XC0,0XE0,0X70,0X38,0X1C,0X0E,0X07,0X03,0X01,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0X03,0X07,0X03,0X01,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,};
uint8_t InterNal_Version [ 128 ]; uint8_t InterNal_Version [ 128 ];
uint8_t SW_Version [ 128 ]; uint8_t SW_Version [ 128 ];
uint8_t HW_Version [ 128 ]; uint8_t HW_Version [ 128 ];
...@@ -26,7 +28,6 @@ uint8_t SUPPLIER [ 128 ];//供应商代码 ...@@ -26,7 +28,6 @@ uint8_t SUPPLIER [ 128 ];//供应商代码
uint8_t Voltage_UDS [ 128 ]; uint8_t Voltage_UDS [ 128 ];
uint8_t BCM_2014 [ 128 ]; uint8_t BCM_2014 [ 128 ];
//uint8_t InterNal_Version [ 128 ]; //uint8_t InterNal_Version [ 128 ];
uint32_t LCD_CHECN_BEGIN; uint32_t LCD_CHECN_BEGIN;
uint32_t LCD_CHECN_Retry; uint32_t LCD_CHECN_Retry;
...@@ -70,7 +71,7 @@ void Function_Check_Ctrl(uint32_t cmd); ...@@ -70,7 +71,7 @@ void Function_Check_Ctrl(uint32_t cmd);
void MENU_CHECK_STEP_ADD(void) void MENU_CHECK_STEP_ADD(void)
{ {
MENU_CHECK_STEP++; MENU_CHECK_STEP++;
if(MENU_CHECK_STEP > 12) if(MENU_CHECK_STEP > 13)
{ {
MENU_CHECK_STEP = 0; MENU_CHECK_STEP = 0;
} }
...@@ -202,9 +203,14 @@ void Diag_Info_Init(void) ...@@ -202,9 +203,14 @@ void Diag_Info_Init(void)
} }
uint8_t Type_Clear = 0; uint8_t Type_Clear = 0;
extern uint8_t BCM_FLAG_2014 = 0; extern uint8_t BCM_FLAG_2014 = 0;
uint32_t loc_Type = 0;
void Total_Check(void) void Total_Check(void)
{ {
uint32_t loc_Type = 0; uint8_t erweima[64] ;
uint8_t cmperweima[34];
uint8_t yibiaoshuju[34];
loc_Type = Get_Display_Type( ); loc_Type = Get_Display_Type( );
if ( Type_Clear != loc_Type ) if ( Type_Clear != loc_Type )
{ {
...@@ -219,29 +225,41 @@ void Total_Check(void) ...@@ -219,29 +225,41 @@ void Total_Check(void)
switch ( loc_Type ) switch ( loc_Type )
{ {
case 0: case 0:
POWER_CTRL_KL30 = 0u; //B+
POWER_CTRL_KL15 = 0u; //KL15
CAN_Msg_Tx_Enable = 1u;
Diag_Info_Init( );
Display_Init( );
Display_Version_Info(0);
Send_Init();
Send_ODO_Init();
// Buzzer_Init(); // Buzzer_Init();
// Function_Check_Ctrl(1); //Excel表格发报文。硬线信号 // Function_Check_Ctrl(1); //Excel表格发报文。硬线信号
//Buzzer_Warning(); //Buzzer_Warning();
// TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_dui12 );
// for(int i = 0;i<34;i++)
// {
// erweima[i] = barcode_Msg[i];
// }
memcpy(erweima,barcode_Msg,34);
erweima[34] = 0xFF;
General_Number_Disp(erweima, 3, 90);
break; break;
case 1: case 1:
POWER_CTRL_KL30 = 0u; //B+ // Buzzer_Warning();
POWER_CTRL_KL15 = 0u; //KL15 memcpy(cmperweima,barcode_Msg1,34);
CAN_Msg_Tx_Enable = 1u;
Send_Init(); // for(int i =0;i<34;i++)
// Function_Check_Ctrl(1); //Excel表格发报文。硬线信号 // {
//FUEL_UDS__Display(3); // cmperweima[i] = barcode_Msg1[i];
Buzzer_Warning(); // }
cmperweima[34] = 0xFF;
General_Number_Disp(cmperweima, 3, 90);
memcpy(yibiaoshuju,get_num_buf,34);
// for(int i =0;i<34;i++)
// {
// yibiaoshuju[i] = get_num_buf[i];
// }
yibiaoshuju[34] = 0xFF;
General_Number_Disp(yibiaoshuju, 3, 165);
// zhenduanflag = 3;
// comparestart = 1;
break; break;
case 2: case 2:
POWER_CTRL_KL30 = 0u; //B+ POWER_CTRL_KL30 = 0u; //B+
...@@ -530,40 +548,40 @@ void Function_Check_Ctrl(uint32_t cmd) ...@@ -530,40 +548,40 @@ void Function_Check_Ctrl(uint32_t cmd)
//Voltage_UDS__Display(); //Voltage_UDS__Display();
//FUEL_UDS__Display(1); //FUEL_UDS__Display(1);
// if ( MENU_CHECK_STEP >= Get_Total_CheckStep( ) ) if ( MENU_CHECK_STEP >= Get_Total_CheckStep( ) )
// { {
// // MENU_CHECK_STEP = 0; // MENU_CHECK_STEP = 0;
// } }
// if ( MENU_BACK != MENU_CHECK_STEP ) if ( MENU_BACK != MENU_CHECK_STEP )
// { {
// MENU_BACK = MENU_CHECK_STEP; MENU_BACK = MENU_CHECK_STEP;
// Execute_Specify_Step(MENU_CHECK_STEP);//Excel表格发报文。 Execute_Specify_Step(MENU_CHECK_STEP);//Excel表格发报文。
// if (0)//数字需要3位还是2位 if (0)//数字需要3位还是2位
// { {
// p [ 0 ] = (MENU_CHECK_STEP + 1) / 100; // 65535 p [ 0 ] = (MENU_CHECK_STEP + 1) / 100; // 65535
// p [ 1 ] = ((MENU_CHECK_STEP + 1) % 100) / 10; p [ 1 ] = ((MENU_CHECK_STEP + 1) % 100) / 10;
// p [ 2 ] = (MENU_CHECK_STEP + 1) % 10; // 65535 p [ 2 ] = (MENU_CHECK_STEP + 1) % 10; // 65535
// p [ 3 ] = 0xff; p [ 3 ] = 0xff;
// } }
// else else
// { {
// p [ 0 ] = ((MENU_CHECK_STEP ) % 100) / 10; p [ 0 ] = ((MENU_CHECK_STEP ) % 100) / 10;
// p [ 1 ] = (MENU_CHECK_STEP ) % 10; // 65535 p [ 1 ] = (MENU_CHECK_STEP ) % 10; // 65535
// p [ 2 ] = 0xff; p [ 2 ] = 0xff;
// } }
// General_Number_Disp(p, 190, 10);//刷图:报文检测步数 General_Number_Disp(p, 190, 10);//刷图:报文检测步数
// } }
Display_Send_Vspead(MENU_CHECK_STEP); Display_Send_Vspead(MENU_CHECK_STEP);
switch (MENU_CHECK_STEP) switch (MENU_CHECK_STEP)
{ {
case 0: case 0:
{ {
LED3 = 0; LED3 = 0; //右转
LED4 = 0; LED4 = 0;
LINE_OUT_NEG_05 = 1; LINE_OUT_NEG_05 = 0;
LINE_OUT_NEG_06 = 0; LINE_OUT_NEG_06 = 0;
LINE_jinguang = 0; LINE_jinguang = 0;
POWER_CTRL_KL30_Current = 0; POWER_CTRL_KL30_Current = 0;
...@@ -582,7 +600,7 @@ void Function_Check_Ctrl(uint32_t cmd) ...@@ -582,7 +600,7 @@ void Function_Check_Ctrl(uint32_t cmd)
{ {
LED3 = 0; LED3 = 0;
LED4 = 0; LED4 = 0;
LINE_OUT_NEG_05 = 0; LINE_OUT_NEG_05 = 1;
LINE_OUT_NEG_06 = 0; LINE_OUT_NEG_06 = 0;
POWER_CTRL_KL30_Current = 0; POWER_CTRL_KL30_Current = 0;
LINE_jinguang = 1; LINE_jinguang = 1;
...@@ -591,57 +609,94 @@ void Function_Check_Ctrl(uint32_t cmd) ...@@ -591,57 +609,94 @@ void Function_Check_Ctrl(uint32_t cmd)
case 2: case 2:
{ {
LED3 = 0; LED3 = 0;
LINE_OUT_NEG_05 = 0; LINE_OUT_NEG_05 = 1;
LINE_OUT_NEG_06 = 0; LINE_OUT_NEG_06 = 0;
LINE_jinguang = 0; LINE_jinguang = 0;
POWER_CTRL_KL30_Current = 0; POWER_CTRL_KL30_Current = 0;
POWER_CTRL_KL30 = 1; POWER_CTRL_KL30 = 1;
LED4 = 1; LED4 = 1;
if(LINE_FUEL_RES04 == 1 || LINE_FUEL_RES02 == 1)
{
LED3 = 1;
}
break; break;
} }
case 3: case 3:
{ {
LED3 = 1; LED3 = 1;
LINE_OUT_NEG_06 = 0; LINE_OUT_NEG_06 = 1;
LINE_OUT_NEG_05 = 0; LINE_OUT_NEG_05 = 1;
LINE_jinguang = 0; LINE_jinguang = 0;
POWER_CTRL_KL30_Current = 0; POWER_CTRL_KL30_Current = 0;
LED4 = 0; LED4 = 0;
break; break;
} }
case 4: case 4:
{ {
LED3 = 0;
LINE_OUT_NEG_06 = 0;
LINE_OUT_NEG_05 = 1;
LINE_jinguang = 0;
POWER_CTRL_KL30_Current = 0;
LED4 = 0;
break; break;
} }
case 5: case 5:
{ {
LED3 = 0;
LINE_OUT_NEG_06 = 0;
LINE_OUT_NEG_05 = 1;
LINE_jinguang = 0;
POWER_CTRL_KL30_Current = 0;
LED4 = 0;
break; break;
} }
case 6: case 6:
{ {
LED3 = 0;
LINE_OUT_NEG_06 = 0;
LINE_OUT_NEG_05 = 1;
LINE_jinguang = 0;
POWER_CTRL_KL30_Current = 0;
LED4 = 0;
break; break;
} }
case 7: case 7:
{ {
LED3 = 0;
LINE_OUT_NEG_06 = 0;
LINE_OUT_NEG_05 = 0;
LINE_jinguang = 0;
POWER_CTRL_KL30_Current = 0;
LED4 = 0;
break; break;
} }
case 8: case 8:
{ {
LED3 = 0;
LINE_OUT_NEG_06 = 0;
LINE_OUT_NEG_05 = 1;
LINE_jinguang = 0;
LED4 = 0;
POWER_CTRL_KL30_Current = 1; POWER_CTRL_KL30_Current = 1;
break; break;
} }
case 9: case 9:
{ {
LED3 = 0;
LINE_OUT_NEG_06 = 0;
LINE_OUT_NEG_05 = 1;
LINE_jinguang = 0;
LED4 = 0;
POWER_CTRL_KL30_Current = 0;
break; break;
} }
case 10: case 10:
{ {
LED3 = 1; LED3 = 1;
LED4 = 1; LED4 = 1;
LINE_OUT_NEG_05 = 1; LINE_OUT_NEG_05 = 0;
LINE_OUT_NEG_06 = 1; LINE_OUT_NEG_06 = 1;
LINE_jinguang = 1; LINE_jinguang = 1;
POWER_CTRL_KL30_Current = 1; POWER_CTRL_KL30_Current = 1;
...@@ -658,7 +713,7 @@ void Function_Check_Ctrl(uint32_t cmd) ...@@ -658,7 +713,7 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_04 = 1; LINE_OUT_NEG_04 = 1;
LED3 = 1; LED3 = 1;
LED4 = 1; LED4 = 1;
LINE_OUT_NEG_05 = 1; LINE_OUT_NEG_05 = 0;
LINE_OUT_NEG_06 = 1; LINE_OUT_NEG_06 = 1;
LINE_jinguang = 1; LINE_jinguang = 1;
POWER_CTRL_KL30_Current = 1; POWER_CTRL_KL30_Current = 1;
...@@ -671,11 +726,23 @@ void Function_Check_Ctrl(uint32_t cmd) ...@@ -671,11 +726,23 @@ void Function_Check_Ctrl(uint32_t cmd)
{ {
LINE_OUT_NEG_01 = 0; LINE_OUT_NEG_01 = 0;
} }
LINE_OUT_NEG_02 = 1; LINE_OUT_NEG_02 = 0;
LINE_OUT_NEG_03 = 1;
LINE_OUT_NEG_04 = 0;
break;
}
case 13:
{
POWER_CTRL_KL30_Current = 0;
if(Auto_ONOFF == 0)
{
LINE_OUT_NEG_01 = 0;
}
LINE_OUT_NEG_02 = 0;
LINE_OUT_NEG_03 = 1; LINE_OUT_NEG_03 = 1;
LINE_OUT_NEG_04 = 0; LINE_OUT_NEG_04 = 0;
break; break;
} }
// case 21: // case 21:
// { // {
// LINE_OUT_POS_01 = 1; // LINE_OUT_POS_01 = 1;
...@@ -714,9 +781,9 @@ void Function_Check_Ctrl(uint32_t cmd) ...@@ -714,9 +781,9 @@ void Function_Check_Ctrl(uint32_t cmd)
// default: default:
// break; break;
// }
// } // }
......
...@@ -2650,7 +2650,7 @@ uint8_t ConverToFont(uint8_t input) ...@@ -2650,7 +2650,7 @@ uint8_t ConverToFont(uint8_t input)
} }
return Ret; return Ret;
} }
void General_Number_Disp(uint8_t *p, uint16_t x, uint16_t y);
void GeneralInfoDisp(uint8_t *p, uint16_t x, uint16_t y) void GeneralInfoDisp(uint8_t *p, uint16_t x, uint16_t y)
{ {
uint8_t i; uint8_t i;
...@@ -2866,7 +2866,7 @@ void GUI_Display_Version_Code_Service(uint8_t StarX, uint16_t PosY, uint8_t * St ...@@ -2866,7 +2866,7 @@ void GUI_Display_Version_Code_Service(uint8_t StarX, uint16_t PosY, uint8_t * St
//************************************************************************************************ //************************************************************************************************
void Display_TFT_Clear(void) void Display_TFT_Clear(void)
{ {
TFT_LCD_Draw_Box(0, 40, 239, 319, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR); TFT_LCD_Draw_Box(0, 0, 239, 319, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR);
} }
void Display_Add(void) void Display_Add(void)
...@@ -2880,7 +2880,18 @@ void Display_Sub(void) ...@@ -2880,7 +2880,18 @@ void Display_Sub(void)
} }
uint32_t Get_Display_Type(void) uint32_t Get_Display_Type(void)
{ {
return 2; if(zhenduanflag == 0)
{
return 2;
}
else if(zhenduanflag == 1)
{
return 0;
}
else
{
return 1;
}
} }
...@@ -3469,7 +3480,7 @@ void Display_Init(void) ...@@ -3469,7 +3480,7 @@ void Display_Init(void)
void Display_Title_Info(void)// 检测台 标题 void Display_Title_Info(void)// 检测台 标题
{ {
TFT_LCD_Draw_Bmp(70, 8, ( uint8_t * )gImage_titlex0_y0); // TFT_LCD_Draw_Bmp(70, 8, ( uint8_t * )gImage_titlex0_y0);
} }
...@@ -3506,7 +3517,8 @@ void HW_Voltage_Check(uint32_t cmd) ...@@ -3506,7 +3517,8 @@ void HW_Voltage_Check(uint32_t cmd)
} }
const uint16_t CurrentDigitNum09PosX[] = {200,180,170}; const uint16_t CurrentDigitNum09PosX[] = {200,180,170};
#define Sampling_NUM 30 #define Sampling_NUM 40
uint32_t dianliu;
void HW_Static_Current_Check(uint32_t cmd) void HW_Static_Current_Check(uint32_t cmd)
{ {
...@@ -3526,7 +3538,8 @@ void HW_Static_Current_Check(uint32_t cmd) ...@@ -3526,7 +3538,8 @@ void HW_Static_Current_Check(uint32_t cmd)
TFT_LCD_Draw_Bmp(3, 60, ( uint8_t * )gImage_Dyy_words_5X6_Y137); TFT_LCD_Draw_Bmp(3, 60, ( uint8_t * )gImage_Dyy_words_5X6_Y137);
TFT_LCD_Draw_Bmp(210, 60, ( uint8_t * )gImage_Dyy_words_18X210_Y139); TFT_LCD_Draw_Bmp(210, 60, ( uint8_t * )gImage_Dyy_words_18X210_Y139);
//电流 *0.25 *100 = 电压 //电流 *0.25 *100 = 电压
loc_Current_0 = ADC_Read_Signal(ADC_CH_KL30_VOLTAGE);//静态电流:电压/25 loc_Current_0 = ADC_Read_Signal(ADC_CH_KL15_VOLTAGE);//静态电流:电压/25
dianliu = loc_Current_0;
...@@ -3537,9 +3550,9 @@ void HW_Static_Current_Check(uint32_t cmd) ...@@ -3537,9 +3550,9 @@ void HW_Static_Current_Check(uint32_t cmd)
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 /= 25;//转化为电流,单位0.001毫安 // loc_ret /= 100;//转化为电流,单位0.001毫安
loc_ret /= 100;//单位0.1毫安 loc_ret /= 10;//单位0.1毫安
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);
...@@ -3587,18 +3600,18 @@ void Display_Version_Info(uint32_t ON_OFF) ...@@ -3587,18 +3600,18 @@ void Display_Version_Info(uint32_t ON_OFF)
loc_Type_back = loc_Type; loc_Type_back = loc_Type;
} }
TFT_LCD_Draw_Bmp(3, 40, ( uint8_t * )gImage_Dyy_words_1X6_Y16 ); //软件版本号 TFT_LCD_Draw_Bmp(3, 25, ( uint8_t * )gImage_Dyy_words_1X6_Y16 ); //软件版本号
// uint8_t mbuffruanjian[2] = {R485_ID48h.Sig.MCUMainSoftwareVer,0xff}; // uint8_t mbuffruanjian[2] = {R485_ID48h.Sig.MCUMainSoftwareVer,0xff};
uint8_t banbenhao = R485_ID48h.Sig.MCUMainSoftwareVer; uint8_t banbenhao = R485_ID48h.Sig.MCUMainSoftwareVer;
uint8_t mbuffruanjian[4] = {R485_ID48h.Sig.MCUMainSoftwareVer,0x2E,R485_ID48h.Sig.MCUSecSoftwareVer,0xff}; uint8_t mbuffruanjian[4] = {R485_ID48h.Sig.MCUMainSoftwareVer,0x2E,R485_ID48h.Sig.MCUSecSoftwareVer,0xff};
General_Number_Disp(mbuffruanjian, 160, 40); General_Number_Disp(mbuffruanjian, 160, 25);
// uint8_t mbuffyingjian[3] = {R485_ID48h.Sig.HardwareVer & 0xF0,R485_ID48h.Sig.HardwareVer & 0x0F ,0xff}; // uint8_t mbuffyingjian[3] = {R485_ID48h.Sig.HardwareVer & 0xF0,R485_ID48h.Sig.HardwareVer & 0x0F ,0xff};
// uint8_t numtesy = 0x55; // uint8_t numtesy = 0x55;
// uint8_t mbuffyingjian[2] = {numtesy,0xff}; // uint8_t mbuffyingjian[2] = {numtesy,0xff};
// General_Number_Disp___No_Wrap(mbuffyingjian, 160, 65); // General_Number_Disp___No_Wrap(mbuffyingjian, 160, 65);
const uint16_t Currenttest[] = {160,170,180}; const uint16_t Currenttest[] = {180,170};
GUI_General_Digit_Display(R485_ID48h.Sig.HardwareVer, Num_15, 3, 0, Currenttest, 65); GUI_General_Digit_Display(R485_ID48h.Sig.HardwareVer, Num_15, 2, 0, Currenttest, 50);
uint8_t wuliao[16]; uint8_t wuliao[16];
// for(int i =0;i < 16; i++) // for(int i =0;i < 16; i++)
// { // {
...@@ -3620,10 +3633,10 @@ void Display_Version_Info(uint32_t ON_OFF) ...@@ -3620,10 +3633,10 @@ void Display_Version_Info(uint32_t ON_OFF)
wuliao[13] = 0x30; wuliao[13] = 0x30;
wuliao[14] = 0x30; wuliao[14] = 0x30;
wuliao[15] = 0xFF; wuliao[15] = 0xFF;
General_Number_Disp(wuliao, 55, 90); General_Number_Disp(wuliao, 3, 90);
TFT_LCD_Draw_Bmp(3, 65, ( uint8_t * )gImage_Dyy_words_2X6_Y46 ); //硬件版本号 TFT_LCD_Draw_Bmp(3, 50, ( uint8_t * )gImage_Dyy_words_2X6_Y46 ); //硬件版本号
TFT_LCD_Draw_Bmp(0, 90, ( uint8_t * )gImage_Dyy_words_3X6_Y75 ); //零件号 TFT_LCD_Draw_Bmp(0, 70, ( uint8_t * )gImage_Dyy_words_3X6_Y75 ); //零件号
TFT_LCD_Draw_Bmp(3, 90+25, ( uint8_t * )gImage_gImage_dianyuanwaifX6_Y165 ); //仪表电电源检测外发对比检验 TFT_LCD_Draw_Bmp(3, 90+30, ( uint8_t * )gImage_gImage_dianyuanwaifX6_Y165 ); //仪表电电源检测外发对比检验
if(powerstdio == 1) if(powerstdio == 1)
{ {
TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_cuo ); //仪表电电源检测外发对比检验 错 TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_cuo ); //仪表电电源检测外发对比检验 错
...@@ -3632,35 +3645,43 @@ void Display_Version_Info(uint32_t ON_OFF) ...@@ -3632,35 +3645,43 @@ void Display_Version_Info(uint32_t ON_OFF)
{ {
TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_dui ); //仪表电电源检测外发对比检验 对 TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_dui ); //仪表电电源检测外发对比检验 对
} }
TFT_LCD_Draw_Bmp(3, 90+25+25+30, ( uint8_t * )gImage_gImage_yibiaowaif1X6_Y16 ); //仪表外发对比检验 TFT_LCD_Draw_Bmp(3, 90+25+25+35, ( uint8_t * )gImage_gImage_yibiaowaif1X6_Y16 ); //仪表外发对比检验
if(checknumwrong == 1) if(checknumwrong == 1)
{ {
TFT_LCD_Draw_Bmp(200, 90+25+25+30, ( uint8_t * )gImage_cuo ); //仪表外发对比检验 错 TFT_LCD_Draw_Bmp(200, 90+25+25+35, ( uint8_t * )gImage_cuo ); //仪表外发对比检验 错
}
else if(checknumwrong == 0)
{
TFT_LCD_Draw_Bmp(200, 90+25+25+35, ( uint8_t * )gImage_dui ); //仪表外发对比检验 对
} }
else else
{ {
TFT_LCD_Draw_Bmp(200, 90+25+25+30, ( uint8_t * )gImage_dui ); //仪表外发对比检验 对 TFT_LCD_Draw_Bmp(200, 90+25+25+35, ( uint8_t * )gImage_dui ); //仪表外发对比检验 对
} }
if(line_stdio == 1) if(line_stdio == 0)
{ {
TFT_LCD_Draw_Bmp(200, 90+25+25+30+25, ( uint8_t * )gImage_cuo ); //硬线指示灯外发对比 错 TFT_LCD_Draw_Bmp(200, 90+25+25+30+30, ( uint8_t * )gImage_cuo ); //硬线指示灯外发对比 错
}
else if(line_stdio == 1)
{
TFT_LCD_Draw_Bmp(200, 90+25+25+30+30, ( uint8_t * )gImage_dui ); //硬线指示灯外发对比 对
} }
else else
{ {
TFT_LCD_Draw_Bmp(200, 90+25+25+30+25, ( uint8_t * )gImage_dui ); //硬线指示灯外发对比 对 TFT_LCD_Draw_Bmp(200, 90+25+25+30+30, ( uint8_t * )gImage_dui ); //硬线指示灯外发对比 对
} }
TFT_LCD_Draw_Bmp(3, 90+25+25+30+25, ( uint8_t * )gImage_gImage_LEDwaif1X6_Y16 ); //硬线指示灯外发对比 TFT_LCD_Draw_Bmp(3, 90+25+25+30+30, ( uint8_t * )gImage_gImage_LEDwaif1X6_Y16 ); //硬线指示灯外发对比
TFT_LCD_Draw_Bmp(3, 90+25+25+30+25+25, ( uint8_t * )gImage_gImage_SV1X6_Y16 ); //软件版本号对比 TFT_LCD_Draw_Bmp(3, 90+25+25+30+25+30, ( uint8_t * )gImage_gImage_SV1X6_Y16 ); //软件版本号对比
TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+25, ( uint8_t * )gImage_dui ); //软件版本号对比 对 TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+30, ( uint8_t * )gImage_dui ); //软件版本号对比 对
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+25, ( uint8_t * )gImage_cuo ); //软件版本号对比 错 // TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+25, ( uint8_t * )gImage_cuo ); //软件版本号对比 错
// TFT_LCD_Draw_Bmp(3, 90+25+25+25+25+25, ( uint8_t * )gImage_gImage_SV1X6_Y16 ); //支持扫码功能个 // TFT_LCD_Draw_Bmp(3, 90+25+25+25+25+25, ( uint8_t * )gImage_gImage_SV1X6_Y16 ); //支持扫码功能个
// TFT_LCD_Draw_Bmp(3, 130, ( uint8_t * )gImage_Dyy_words_4X6_Y107); //供应商编码 // TFT_LCD_Draw_Bmp(3, 130, ( uint8_t * )gImage_Dyy_words_4X6_Y107); //供应商编码
TFT_LCD_Draw_Bmp(0, 90+25+25+30+25+25+25, ( uint8_t * )gImage_Dyy_words_6X6_Y165); //10V电压输出 TFT_LCD_Draw_Bmp(0, 90+25+25+30+25+25+30, ( uint8_t * )gImage_Dyy_words_6X6_Y165); //10V电压输出
// leftvoltage = ADC_Read_Signal(ADC_CH_left_VOLTAGE); // leftvoltage = ADC_Read_Signal(ADC_CH_left_VOLTAGE);
// rightvoltage = ADC_Read_Signal(ADC_CH_right_VOLTAGE); // rightvoltage = ADC_Read_Signal(ADC_CH_right_VOLTAGE);
// uint8_t mLRbuff [3] = {leftvoltage,rightvoltage,0xff}; // uint8_t mLRbuff [3] = {leftvoltage,rightvoltage,0xff};
// General_Number_Disp(mLRbuff, 100, 90+25+25+30+25+25+25); // General_Number_Disp(mLRbuff, 100, 90+25+25+30+25+25+30);
// TFT_LCD_Draw_Bmp(210, 160, ( uint8_t * )gImage_Dyy_words_19X224_Y166); //单位:V // TFT_LCD_Draw_Bmp(210, 160, ( uint8_t * )gImage_Dyy_words_19X224_Y166); //单位:V
// TFT_LCD_Draw_Bmp(3, 190, ( uint8_t * )gImage_Dyy_words_7X6_Y196); //高压/低压故障 // TFT_LCD_Draw_Bmp(3, 190, ( uint8_t * )gImage_Dyy_words_7X6_Y196); //高压/低压故障
//TFT_LCD_Draw_Bmp(3, 220, ( uint8_t * )gImage_Dyy_words_8X6_Y228); //气压1传感器 //TFT_LCD_Draw_Bmp(3, 220, ( uint8_t * )gImage_Dyy_words_8X6_Y228); //气压1传感器
...@@ -3668,9 +3689,9 @@ void Display_Version_Info(uint32_t ON_OFF) ...@@ -3668,9 +3689,9 @@ void Display_Version_Info(uint32_t ON_OFF)
//TFT_LCD_Draw_Bmp(3, 280, ( uint8_t * )gImage_Dyy_words_10X6_Y288); //燃油传感器 //TFT_LCD_Draw_Bmp(3, 280, ( uint8_t * )gImage_Dyy_words_10X6_Y288); //燃油传感器
// 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, 280, ( uint8_t * )gImage_gImage_checkVX6_Y165 ); //检测台版本号 TFT_LCD_Draw_Bmp(3, 290, ( uint8_t * )gImage_gImage_checkVX6_Y165 ); //检测台版本号
uint8_t mbuff [4] = {1,0,0,0xff}; uint8_t mbuff [4] = {1,0,0,0xff};
General_Number_Disp(mbuff, 160, 280); General_Number_Disp(mbuff, 160, 290);
...@@ -4190,7 +4211,7 @@ void Display_Send_Vspead(uint8_t menu) ...@@ -4190,7 +4211,7 @@ void Display_Send_Vspead(uint8_t menu)
} }
if(menu > 0) if(menu > 0)
{ {
if(menu != 12) if(menu != 13)
{ {
TFT_LCD_Draw_Bmp(3, 40, ( uint8_t * )gImage_Dey_words_1X6_Y16); TFT_LCD_Draw_Bmp(3, 40, ( uint8_t * )gImage_Dey_words_1X6_Y16);
TFT_LCD_Draw_Bmp(180, 40, ( uint8_t * )gImage_Dey_words_5X195_Y16); TFT_LCD_Draw_Bmp(180, 40, ( uint8_t * )gImage_Dey_words_5X195_Y16);
...@@ -4360,7 +4381,7 @@ void Display_Send_Vspead(uint8_t menu) ...@@ -4360,7 +4381,7 @@ void Display_Send_Vspead(uint8_t menu)
break; break;
case 6: case 6:
TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_seat1X6_Y16); // TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_seat1X6_Y16);
TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_doupoX6_Y165); TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_doupoX6_Y165);
// GUI_Display_Version_Code_Service(160, 40+25, "55", Letter_Num_11, PCodeText_Space_size); // GUI_Display_Version_Code_Service(160, 40+25, "55", Letter_Num_11, PCodeText_Space_size);
...@@ -4477,8 +4498,11 @@ void Display_Send_Vspead(uint8_t menu) ...@@ -4477,8 +4498,11 @@ void Display_Send_Vspead(uint8_t menu)
GUI_Display_Version_Code_Service(70, 40+25+25+25+25+25+25+25, "ALL", Letter_Num_11, PCodeText_Space_size); GUI_Display_Version_Code_Service(70, 40+25+25+25+25+25+25+25, "ALL", Letter_Num_11, PCodeText_Space_size);
break; break;
case 12: case 12:
POWER_CTRL_KL30 = 0u; //B+ TFT_LCD_Draw_Bmp(20, 40+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_bluetoothX6_Y165);
POWER_CTRL_KL15 = 0u; //KL15 break;
case 13:
// POWER_CTRL_KL30 = 0u; //B+
// POWER_CTRL_KL15 = 0u; //KL15
CAN_Msg_Tx_Enable = 0u; CAN_Msg_Tx_Enable = 0u;
//Diag_Info_Init( ); //Diag_Info_Init( );
//Display_Init( ); //Display_Init( );
...@@ -4492,7 +4516,7 @@ void Display_Send_Vspead(uint8_t menu) ...@@ -4492,7 +4516,7 @@ void Display_Send_Vspead(uint8_t menu)
MENU_CHECK_STEP = 0; MENU_CHECK_STEP = 0;
break; break;
} }
if(menu != 12) if(menu != 13)
{ {
GUI_General_Digit_Display(VSpeed_val, Num_15, 6, 5, ODODigitNum09PosX, 40); GUI_General_Digit_Display(VSpeed_val, Num_15, 6, 5, ODODigitNum09PosX, 40);
GUI_General_Digit_Display(fuel_val, Num_15, 6, 5, ODODigitNum09PosX, 40+25); GUI_General_Digit_Display(fuel_val, Num_15, 6, 5, ODODigitNum09PosX, 40+25);
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "Check_Ctrl.h" #include "Check_Ctrl.h"
#include "Barcode_Scanner.h" #include "Barcode_Scanner.h"
#include "Task.h" #include "Task.h"
#include "string.h"
void Key_Operation_SW5(Key_Event_en_t enKeyEvent) void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
...@@ -116,7 +117,7 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent) ...@@ -116,7 +117,7 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if(zhenduanflag == 0) if(zhenduanflag != 1)
{ {
zhenduanflag = 1; zhenduanflag = 1;
} }
...@@ -128,6 +129,8 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent) ...@@ -128,6 +129,8 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
LINE_OUT_NEG_03 = 1; LINE_OUT_NEG_03 = 1;
LINE_OUT_NEG_04 = 1; LINE_OUT_NEG_04 = 1;
zhenduansendStep = 0; zhenduansendStep = 0;
// memset(barcode_Msg,0,sizeof(barcode_Msg));
} }
RS485_TX_finish = 0; RS485_TX_finish = 0;
...@@ -146,14 +149,14 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent) ...@@ -146,14 +149,14 @@ 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_01 == 1) if(LINE_OUT_NEG_01 == 1U)
{ {
LINE_OUT_NEG_01 = 0; LINE_OUT_NEG_01 = 0U;
Auto_ONOFF = 3; Auto_ONOFF = 3;
} }
else else
{ {
LINE_OUT_NEG_01 = 1; LINE_OUT_NEG_01 = 1U;
Auto_ONOFF == 0; Auto_ONOFF == 0;
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include "Barcode_Scanner.h" #include "Barcode_Scanner.h"
#include "string.h" #include "string.h"
uint8_t barcode_Msg[64]; uint8_t barcode_Msg[64];
uint8_t barcode_Msg1[64];
uint32_t R485_Send_0x40(void) uint32_t R485_Send_0x40(void)
{ {
memset(R485_ID40h.Msg, 0xFF, 64); memset(R485_ID40h.Msg, 0xFF, 64);
...@@ -62,7 +63,7 @@ uint32_t R485_Send_0x41(void) ...@@ -62,7 +63,7 @@ uint32_t R485_Send_0x41(void)
case 0: case 0:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -73,7 +74,7 @@ uint32_t R485_Send_0x41(void) ...@@ -73,7 +74,7 @@ uint32_t R485_Send_0x41(void)
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 = 0x3; //整车状态 R485_ID41h.Sig.VehicleStatus = 0x1; //整车状态
R485_ID41h.Sig.SpeedGear = 0x2; //挡位 R485_ID41h.Sig.SpeedGear = 0x2; //挡位
...@@ -106,7 +107,7 @@ uint32_t R485_Send_0x41(void) ...@@ -106,7 +107,7 @@ uint32_t R485_Send_0x41(void)
case 1: case 1:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -152,7 +153,7 @@ uint32_t R485_Send_0x41(void) ...@@ -152,7 +153,7 @@ uint32_t R485_Send_0x41(void)
case 2: case 2:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -204,7 +205,7 @@ uint32_t R485_Send_0x41(void) ...@@ -204,7 +205,7 @@ uint32_t R485_Send_0x41(void)
{ {
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -251,7 +252,7 @@ uint32_t R485_Send_0x41(void) ...@@ -251,7 +252,7 @@ uint32_t R485_Send_0x41(void)
{ {
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -299,7 +300,7 @@ uint32_t R485_Send_0x41(void) ...@@ -299,7 +300,7 @@ uint32_t R485_Send_0x41(void)
case 4: case 4:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -349,7 +350,7 @@ uint32_t R485_Send_0x41(void) ...@@ -349,7 +350,7 @@ uint32_t R485_Send_0x41(void)
case 5: case 5:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x0; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x0; //TCS激活
...@@ -399,7 +400,7 @@ uint32_t R485_Send_0x41(void) ...@@ -399,7 +400,7 @@ uint32_t R485_Send_0x41(void)
case 6: case 6:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -470,7 +471,7 @@ uint32_t R485_Send_0x41(void) ...@@ -470,7 +471,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.IOTRealTime_Hour = 0x10; //时间:时 R485_ID41h.Sig.IOTRealTime_Hour = 0x10; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0x6; //时间:分 R485_ID41h.Sig.IOTRealTime_Minute = 0x6; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒 R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
R485_ID41h.Sig.SlopePattern = 0x1; //跛行 // R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.HandlebarFaultIndicator = 0; R485_ID41h.Sig.HandlebarFaultIndicator = 0;
R485_ID41h.Sig.UUpBridgeArmMosFault = 0; R485_ID41h.Sig.UUpBridgeArmMosFault = 0;
...@@ -496,7 +497,7 @@ uint32_t R485_Send_0x41(void) ...@@ -496,7 +497,7 @@ uint32_t R485_Send_0x41(void)
case 8: case 8:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -525,7 +526,7 @@ uint32_t R485_Send_0x41(void) ...@@ -525,7 +526,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.MCUFaultStateU_PhaseHallFault = 0; R485_ID41h.Sig.MCUFaultStateU_PhaseHallFault = 0;
R485_ID41h.Sig.MCUFaultStateV_PhaseHallFault = 0; R485_ID41h.Sig.MCUFaultStateV_PhaseHallFault = 0;
R485_ID41h.Sig.MCUFaultStateW_PhaseHallFault = 0; R485_ID41h.Sig.MCUFaultStateW_PhaseHallFault = 0;
R485_ID41h.Sig.MCUFaultStatus_HandlebarFault = 0; R485_ID41h.Sig.MCUFaultStatus_HandlebarFault = 1;
R485_ID41h.Sig.BMS_0CommunicationStatus = 0; R485_ID41h.Sig.BMS_0CommunicationStatus = 0;
R485_ID41h.Sig.MCUCommunicationStatus = 0; R485_ID41h.Sig.MCUCommunicationStatus = 0;
R485_ID41h.Sig.ALMCommunicationStatus = 0; R485_ID41h.Sig.ALMCommunicationStatus = 0;
...@@ -541,7 +542,7 @@ uint32_t R485_Send_0x41(void) ...@@ -541,7 +542,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态 R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行 R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -594,7 +595,7 @@ uint32_t R485_Send_0x41(void) ...@@ -594,7 +595,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x1; //充电状态 R485_ID41h.Sig.ChargeState = 0x1; //充电状态
R485_ID41h.Sig.SlopePattern = 0x1; //跛行 R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x1; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x1; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -636,7 +637,7 @@ uint32_t R485_Send_0x41(void) ...@@ -636,7 +637,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯 R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x1; //充电状态 R485_ID41h.Sig.ChargeState = 0x1; //充电状态
R485_ID41h.Sig.SlopePattern = 0x1; //跛行 R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力 R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x1; //陡坡缓降 R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x1; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活 R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
...@@ -813,6 +814,7 @@ uint32_t R485_Send_0x47(void) ...@@ -813,6 +814,7 @@ uint32_t R485_Send_0x47(void)
LINE_OUT_NEG_02 = 0; LINE_OUT_NEG_02 = 0;
LINE_OUT_NEG_03 = 0; LINE_OUT_NEG_03 = 0;
LINE_OUT_NEG_04 = 0; LINE_OUT_NEG_04 = 0;
break; break;
default: default:
......
...@@ -1138,4 +1138,5 @@ extern uint32_t R485_Send_clear(void); ...@@ -1138,4 +1138,5 @@ extern uint32_t R485_Send_clear(void);
extern uint32_t R485_Sendcheck_0x47(void); extern uint32_t R485_Sendcheck_0x47(void);
extern uint8_t barcode_Msg[64]; extern uint8_t barcode_Msg[64];
extern uint8_t barcode_Msg1[64];
#endif #endif
...@@ -83,10 +83,28 @@ void RTE_GPIO_Init(void) ...@@ -83,10 +83,28 @@ void RTE_GPIO_Init(void)
gpio_temp.enGPIODir = GPIO_DIR_OUT; gpio_temp.enGPIODir = GPIO_DIR_OUT;
gpio_temp.enGPIOAltFun = GPIO_ALTER_FUN_1; gpio_temp.enGPIOAltFun = GPIO_ALTER_FUN_1;
GPIO_Config(&gpio_temp); GPIO_Config(&gpio_temp);
LINE_OUT_NEG_01 = 1; gpio_temp.enGPIOPort = GPIO_PORT_GROUP_AP0;
LINE_OUT_NEG_02 = 1; gpio_temp.enGPIOPIN = GPIO_PIN_9;
LINE_OUT_NEG_03 = 1; gpio_temp.enGPIOMode = GPIO_MODE_PORT;
LINE_OUT_NEG_04 = 1; gpio_temp.enGPIODir = GPIO_DIR_IN;
gpio_temp.enGPIOAltFun = GPIO_ALTER_FUN_1;
GPIO_Config(&gpio_temp);
gpio_temp.enGPIOPort = GPIO_PORT_GROUP_8;
gpio_temp.enGPIOPIN = GPIO_PIN_12;
gpio_temp.enGPIOMode = GPIO_MODE_PORT;
gpio_temp.enGPIODir = GPIO_DIR_IN;
gpio_temp.enGPIOAltFun = GPIO_ALTER_FUN_1;
GPIO_Config(&gpio_temp);
gpio_temp.enGPIOPort = GPIO_PORT_GROUP_8;
gpio_temp.enGPIOPIN = GPIO_PIN_11;
gpio_temp.enGPIOMode = GPIO_MODE_PORT;
gpio_temp.enGPIODir = GPIO_DIR_IN;
gpio_temp.enGPIOAltFun = GPIO_ALTER_FUN_1;
GPIO_Config(&gpio_temp);
// LINE_OUT_NEG_01 = 1;
// LINE_OUT_NEG_02 = 1;
// LINE_OUT_NEG_03 = 1;
// LINE_OUT_NEG_04 = 1;
#if(0) #if(0)
gpio_temp.enGPIOPort = GPIO_PORT_GROUP_0; gpio_temp.enGPIOPort = GPIO_PORT_GROUP_0;
......
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
#define SW10 GPIO_IN_PORT10_PIN06 #define SW10 GPIO_IN_PORT10_PIN06
#define FUEL_RES_1 GPIO_OUT_PORT00_PIN13 #define FUEL_RES_1 GPIO_OUT_PORT00_PIN13
#define FUEL_RES_2 GPIO_OUT_PORT08_PIN12 // #define FUEL_RES_2 GPIO_OUT_PORT08_PIN12
#define FUEL_RES_3 GPIO_OUT_PORT08_PIN10 #define FUEL_RES_3 GPIO_OUT_PORT08_PIN10
#define FUEL_RES_4 GPIO_OUT_PORT08_PIN11 // #define FUEL_RES_4 GPIO_OUT_PORT08_PIN11
#define LINE_OUT_CHARGER GPIO_OUT_PORT10_PIN06// #define LINE_OUT_CHARGER GPIO_OUT_PORT10_PIN06//
#define LINE_OUT_OIL GPIO_OUT_PORT10_PIN06 #define LINE_OUT_OIL GPIO_OUT_PORT10_PIN06
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
#define NEG_3_Ctrl GPIO_OUT_PORT09_PIN04 #define NEG_3_Ctrl GPIO_OUT_PORT09_PIN04
#define NEG_4_Ctrl GPIO_OUT_PORT09_PIN03 #define NEG_4_Ctrl GPIO_OUT_PORT09_PIN03
#define NEG_5_Ctrl GPIO_OUT_PORT09_PIN02 #define NEG_5_Ctrl GPIO_OUT_PORT09_PIN02
#define NEG_6_Ctrl GPIO_OUT_PORT09_PIN01 // #define NEG_6_Ctrl GPIO_OUT_PORT09_PIN01
#define NEG_7_Ctrl GPIO_OUT_PORT10_PIN07 #define NEG_7_Ctrl GPIO_OUT_PORT10_PIN07
#define NEG_8_Ctrl GPIO_OUT_PORT10_PIN03 #define NEG_8_Ctrl GPIO_OUT_PORT10_PIN03
#define NEG_9_Ctrl GPIO_OUT_PORT10_PIN04 #define NEG_9_Ctrl GPIO_OUT_PORT10_PIN04
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
#define LINE_SafeBelt_4 NEG_4_Ctrl #define LINE_SafeBelt_4 NEG_4_Ctrl
#define LINE_SafeBelt_5 NEG_5_Ctrl #define LINE_SafeBelt_5 NEG_5_Ctrl
#define LINE_SafeBelt_2_press NEG_6_Ctrl // #define LINE_SafeBelt_2_press NEG_6_Ctrl
#define LINE_SafeBelt_3_press NEG_7_Ctrl #define LINE_SafeBelt_3_press NEG_7_Ctrl
#define LINE_SafeBelt_4_press NEG_8_Ctrl #define LINE_SafeBelt_4_press NEG_8_Ctrl
#define LINE_SafeBelt_5_press NEG_9_Ctrl #define LINE_SafeBelt_5_press NEG_9_Ctrl
...@@ -101,9 +101,11 @@ ...@@ -101,9 +101,11 @@
#define LINE_OUT_NEG_10 GPIO_OUT_PORT00_PIN08 #define LINE_OUT_NEG_10 GPIO_OUT_PORT00_PIN08
#define LINE_FUEL_RES01 GPIO_OUT_PORT00_PIN13 #define LINE_FUEL_RES01 GPIO_OUT_PORT00_PIN13
#define LINE_FUEL_RES02 GPIO_OUT_PORT08_PIN12
#define LINE_FUEL_RES03 GPIO_OUT_PORT08_PIN10 #define LINE_FUEL_RES03 GPIO_OUT_PORT08_PIN10
#define LINE_FUEL_RES04 GPIO_OUT_PORT08_PIN11
#define LINE_FUEL_RES04 GPIO_OUT_PORT08_PIN11 //左转 输入
#define LINE_FUEL_RES02 GPIO_OUT_PORT08_PIN12 //右转 输入
#define GPIO_VSpeed_PWM_IN GPIO_IN_PORT10_PIN15 #define GPIO_VSpeed_PWM_IN GPIO_IN_PORT10_PIN15
......
...@@ -93,7 +93,6 @@ void Sys_Run_Mode_10ms_Tasks_Group(void) ...@@ -93,7 +93,6 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
// UART_Ch0_Send_Multiple_Byte(testdata,3); // UART_Ch0_Send_Multiple_Byte(testdata,3);
// RS485_User_Tx_Data(); // RS485_User_Tx_Data();
if(clearOdoFlag == 0) if(clearOdoFlag == 0)
{ {
backsend(); backsend();
...@@ -152,7 +151,6 @@ void Sys_Run_Mode_10ms_Tasks_Group(void) ...@@ -152,7 +151,6 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
queren = 1; queren = 1;
} }
} }
} }
...@@ -185,7 +183,7 @@ void Sys_Run_Mode_20ms_Tasks_Group0(void) ...@@ -185,7 +183,7 @@ void Sys_Run_Mode_20ms_Tasks_Group0(void)
time100mssend = 0; time100mssend = 0;
} }
} }
/*============================================================================== /*==============================================================================
...@@ -251,6 +249,7 @@ uint16_t u16LJSText; ...@@ -251,6 +249,7 @@ uint16_t u16LJSText;
uint32_t AutoTime = 160; uint32_t AutoTime = 160;
uint32_t ONOFFtime; uint32_t ONOFFtime;
uint8_t compareresult; uint8_t compareresult;
uint8_t flashtime = 0;
void Sys_Run_Mode_100ms_Tasks_Group(void) void Sys_Run_Mode_100ms_Tasks_Group(void)
{ {
static uint32_t loc_timer = 0; static uint32_t loc_timer = 0;
...@@ -281,9 +280,9 @@ void Sys_Run_Mode_100ms_Tasks_Group(void) ...@@ -281,9 +280,9 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
MENU_CHECK_STEP_ADD( ); MENU_CHECK_STEP_ADD( );
if(MENU_CHECK_STEP == 0) if(MENU_CHECK_STEP == 0)
{ {
MENU_CHECK_STEP = 1; MENU_CHECK_STEP = 0;
} }
if(MENU_CHECK_STEP == 12) if(MENU_CHECK_STEP == 13)
{ {
AutoTime = 0; AutoTime = 0;
} }
...@@ -316,29 +315,56 @@ void Sys_Run_Mode_100ms_Tasks_Group(void) ...@@ -316,29 +315,56 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
} }
} }
} }
if(flashtime < 3)
{
flashtime++;
}
else
{
if(comparestart == 1) if(comparestart == 1)
{ {
compareresult = GetDataCompare(); compareresult = GetDataCompare();
Display_TFT_Clear(); // Display_TFT_Clear();
if(compareresult == 1) if(compareresult == 1)
{ {
TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_cuo1 ); TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_cuo1 );
comparestart = 2; // comparestart = 2;
} }
else else
{ {
TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_dui1 ); TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_dui1 );
comparestart = 2; // comparestart = 2;
} }
comparestart = 0;
Display_TFT_Clear();
} }
else if(comparestart == 0) else if(comparestart == 0)
{ {
Total_Check( ); Total_Check( );
if(zhenduanflag == 3)
{
if(compareresult == 1)
{
TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_cuo1 );
// comparestart = 2;
}
else
{
TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_dui1 );
// comparestart = 2;
}
// comparestart = 1;
}
} }
else else
{ {
; Total_Check();
} }
flashtime = 0;
}
//u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH; //u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH;
} }
......
...@@ -505,7 +505,7 @@ void RS485_User_Tx_Data(void) ...@@ -505,7 +505,7 @@ void RS485_User_Tx_Data(void)
} }
void backsend(void) void backsend(void)
{ {
if(RS485_send_time>=20) if(RS485_send_time>=15)
{ {
RS485_send_time = 0; RS485_send_time = 0;
RS485_TX_finish = 0; RS485_TX_finish = 0;
......
...@@ -74,7 +74,7 @@ ADC_Data_st_t stADCData[ADC_SIGNAL_CH_NUMBER]; ...@@ -74,7 +74,7 @@ ADC_Data_st_t stADCData[ADC_SIGNAL_CH_NUMBER];
const uint8_t u8ADCChList[ADC_CONV_CH_NUMBER] = const uint8_t u8ADCChList[ADC_CONV_CH_NUMBER] =
{ {
9U, 15U, 14U ,18U , 19U, 9U, 15U, 14U ,
}; };
const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] = const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] =
...@@ -82,8 +82,6 @@ const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] = ...@@ -82,8 +82,6 @@ const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] =
{ 0U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,}, { 0U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,},
{ 1U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,}, { 1U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,},
{ 2U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,}, { 2U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
{ 3U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
{ 4U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
}; };
const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] = const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
...@@ -91,8 +89,6 @@ const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] = ...@@ -91,8 +89,6 @@ const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
{ 0U, 100000U, 0U, 0U,}, { 0U, 100000U, 0U, 0U,},
{ 0U, 100000U, 0U, 0U,}, { 0U, 100000U, 0U, 0U,},
{ 330000U, 47000U, 0U, 0U,}, { 330000U, 47000U, 0U, 0U,},
{ 0U, 100000U, 0U, 0U,},
{ 0U, 100000U, 0U, 0U,},
}; };
/* Private function prototypes ----------------------------------------------*/ /* Private function prototypes ----------------------------------------------*/
......
...@@ -30,13 +30,11 @@ enum ADCChName ...@@ -30,13 +30,11 @@ enum ADCChName
ADC_CH_KL15_VOLTAGE = 0, ADC_CH_KL15_VOLTAGE = 0,
ADC_CH_KL30_VOLTAGE, ADC_CH_KL30_VOLTAGE,
ADC_CH_10_VOLTAGE, ADC_CH_10_VOLTAGE,
ADC_CH_left_VOLTAGE,
ADC_CH_right_VOLTAGE,
}; };
/* Exported macro ------------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/
#define ADC_TOTAL_CH_NUMBER (5U) #define ADC_TOTAL_CH_NUMBER (3U)
#define ADC_SIGNAL_CH_NUMBER (5U) #define ADC_SIGNAL_CH_NUMBER (3U)
#define ADC_REF_VOLTAGE u16ADCRefVoltage #define ADC_REF_VOLTAGE u16ADCRefVoltage
/* Exported variables --------------------------------------------------------*/ /* Exported variables --------------------------------------------------------*/
......
...@@ -79,7 +79,7 @@ const uint8_t u8ADCChList[ADC_CONV_CH_NUMBER] = ...@@ -79,7 +79,7 @@ const uint8_t u8ADCChList[ADC_CONV_CH_NUMBER] =
const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] = const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] =
{ {
{ 0U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,}, { 0U, 0U, 0U, 30U, 0U, 1U, ADC_Voltage_Calc_Circuit101,},
{ 1U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,}, { 1U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,},
{ 2U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,}, { 2U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
}; };
......
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