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

feat:1225写入检验显示

parent ff202fcd
......@@ -32,7 +32,7 @@ uint8_t sendmsg[8];
uint8_t timenum = 0;
uint8_t firstflag = 0;
uint8_t RS485_data[64];
uint8_t checknumwrong;
uint8_t checknumwrong = 3;
uint8_t zhenduanflag = 0;
uint8_t clearOdoFlag = 0;
uint8_t Auto_ONOFF = 0;
......@@ -40,7 +40,7 @@ uint32_t key_value;
uint8_t key_array[4];
uint8_t seed_value[4];
uint8_t zhenduansendStep = 0;
uint8_t line_stdio = 0;
uint8_t line_stdio = 2;
uint8_t powerstdio = 0;
uint8_t get_num_buf[34];
uint8_t comparestart;
......@@ -118,41 +118,49 @@ void datacheck(void)
break;
case 1:
LineGetSta.ble1 = BarCode[7];
if(LineGetSta.ble1 == 0)
if(LineGetSta.ble1 == 1)
{
line_stdio = 1;
}
break;
case 2:
LineGetSta.turnleft1 = BarCode[7];
if(LineGetSta.turnleft1 == 1)
{
line_stdio = 1;
}
break;
case 3:
LineGetSta.turnright1 = BarCode[7];
if(LineGetSta.turnright1 == 1)
{
line_stdio = 1;
}
break;
case 4:
LineGetSta.ABSlight1 = BarCode[7];
if(LineGetSta.ABSlight1 == 0)
if(LineGetSta.ABSlight1 == 1)
{
line_stdio = 1;
}
break;
case 5:
LineGetSta.lowlight1 = BarCode[7];
if(LineGetSta.lowlight1 == 0)
if(LineGetSta.lowlight1 == 1)
{
line_stdio = 1;
}
break;
case 6:
LineGetSta.highlight1 = BarCode[7];
if(LineGetSta.highlight1 == 0)
if(LineGetSta.highlight1 == 1)
{
line_stdio = 1;
}
break;
case 7:
LineGetSta.weizhilight1 = BarCode[7];
if(LineGetSta.weizhilight1 == 0)
if(LineGetSta.weizhilight1 == 1)
{
line_stdio = 1;
}
......@@ -170,10 +178,14 @@ void datacheck(void)
}
else
{
RS485_send_num--;
// RS485_send_num--;
RS485_TX_finish = 0;
}
}
else
{
RS485_TX_finish = 0;
}
}
else if(zhenduanflag == 1)
{
......@@ -261,7 +273,7 @@ void datacheck(void)
}
}
}
else
else if(zhenduanflag == 2)
{
if(BarCode[0] == 0x59 && BarCode[1] == 0x44)
{
......@@ -279,36 +291,47 @@ void datacheck(void)
memcpy(get_num_buf,BarCode+7,34 );
comparestart = 1;
zhenduanflag = 3;
}
}
}
}
}
uint8_t cmpresult = 3;
void BarCodeDataGet(void)
{
if((mDataBufPtr1[0] == 0x59) && (mDataBufPtr1[1] == 0x59)&&(mDataBufPtr1[39] != 0x0))
{
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 result = 0;
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;
}
else
{
result = 1;
cmpresult = 1;
return cmpresult;
// u8compareresult = 1;
}
return result;
}
return cmpresult;
}
void UART_Put(uint32_t Value)
{
......@@ -371,7 +394,7 @@ void Recv_Byte(void)
{
for(i = 0; i < mDataBufLen; i++)
{
if(i > 4)
if(i > 5)
{
if((mDataBufPtr[i] == 0x4A ) && (mDataBufPtr[i - 1] == 0x4B))
{
......@@ -402,7 +425,6 @@ void Recv_Byte(void)
// memcpy(nowdata,mDataBufPtr + len,len);
// datacheck();
}
// if()
mDataBufLen -= len;
datacheck();
}
......@@ -455,7 +477,10 @@ void Recv_Byte1(void)
int j = 0;
uint32_t len;
readNum1 = Protocol_UartRead1(mDataBufPtr1 + mDataBufLen1, 1024 - mDataBufLen1);
if (readNum1 > 0)
{
BarCodeDataGet();
}
if (readNum1 > 0)
{
mDataBufLen1 += readNum1;
......
......@@ -4,6 +4,7 @@
#include "Check_Ctrl.h"
#include "Barcode_Scanner.h"
#include "Task.h"
#include "string.h"
void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
......@@ -116,7 +117,7 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
if(zhenduanflag == 0)
if(zhenduanflag != 1)
{
zhenduanflag = 1;
}
......@@ -128,6 +129,8 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
LINE_OUT_NEG_03 = 1;
LINE_OUT_NEG_04 = 1;
zhenduansendStep = 0;
// memset(barcode_Msg,0,sizeof(barcode_Msg));
}
RS485_TX_finish = 0;
......@@ -146,14 +149,14 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{
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;
}
else
{
LINE_OUT_NEG_01 = 1;
LINE_OUT_NEG_01 = 1U;
Auto_ONOFF == 0;
}
......
......@@ -2,6 +2,7 @@
#include "Barcode_Scanner.h"
#include "string.h"
uint8_t barcode_Msg[64];
uint8_t barcode_Msg1[64];
uint32_t R485_Send_0x40(void)
{
memset(R485_ID40h.Msg, 0xFF, 64);
......@@ -62,7 +63,7 @@ uint32_t R485_Send_0x41(void)
case 0:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -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.TotalBatterySOC = 0x0; //电量
R485_ID41h.Sig.VehicleStatus = 0x3; //整车状态
R485_ID41h.Sig.VehicleStatus = 0x1; //整车状态
R485_ID41h.Sig.SpeedGear = 0x2; //挡位
......@@ -106,7 +107,7 @@ uint32_t R485_Send_0x41(void)
case 1:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -152,7 +153,7 @@ uint32_t R485_Send_0x41(void)
case 2:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -204,7 +205,7 @@ uint32_t R485_Send_0x41(void)
{
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -251,7 +252,7 @@ uint32_t R485_Send_0x41(void)
{
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -299,7 +300,7 @@ uint32_t R485_Send_0x41(void)
case 4:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -349,7 +350,7 @@ uint32_t R485_Send_0x41(void)
case 5:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x0; //TCS激活
......@@ -399,7 +400,7 @@ uint32_t R485_Send_0x41(void)
case 6:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -470,7 +471,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.IOTRealTime_Hour = 0x10; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0x6; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
// R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.HandlebarFaultIndicator = 0;
R485_ID41h.Sig.UUpBridgeArmMosFault = 0;
......@@ -496,7 +497,7 @@ uint32_t R485_Send_0x41(void)
case 8:
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -525,7 +526,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.MCUFaultStateU_PhaseHallFault = 0;
R485_ID41h.Sig.MCUFaultStateV_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.MCUCommunicationStatus = 0;
R485_ID41h.Sig.ALMCommunicationStatus = 0;
......@@ -541,7 +542,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x0; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -594,7 +595,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x1; //充电状态
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x1; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -636,7 +637,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x1; //充电状态
R485_ID41h.Sig.SlopePattern = 0x1; //跛行
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
R485_ID41h.Sig.SlopeDescentFunctionStatus = 0x1; //陡坡缓降
R485_ID41h.Sig.TCSActivation = 0x1; //TCS激活
......@@ -813,6 +814,7 @@ uint32_t R485_Send_0x47(void)
LINE_OUT_NEG_02 = 0;
LINE_OUT_NEG_03 = 0;
LINE_OUT_NEG_04 = 0;
break;
default:
......
......@@ -1138,4 +1138,5 @@ extern uint32_t R485_Send_clear(void);
extern uint32_t R485_Sendcheck_0x47(void);
extern uint8_t barcode_Msg[64];
extern uint8_t barcode_Msg1[64];
#endif
......@@ -83,10 +83,28 @@ void RTE_GPIO_Init(void)
gpio_temp.enGPIODir = GPIO_DIR_OUT;
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;
gpio_temp.enGPIOPort = GPIO_PORT_GROUP_AP0;
gpio_temp.enGPIOPIN = GPIO_PIN_9;
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_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)
gpio_temp.enGPIOPort = GPIO_PORT_GROUP_0;
......
......@@ -34,9 +34,9 @@
#define SW10 GPIO_IN_PORT10_PIN06
#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_4 GPIO_OUT_PORT08_PIN11
// #define FUEL_RES_4 GPIO_OUT_PORT08_PIN11
#define LINE_OUT_CHARGER GPIO_OUT_PORT10_PIN06//
#define LINE_OUT_OIL GPIO_OUT_PORT10_PIN06
......@@ -60,7 +60,7 @@
#define NEG_3_Ctrl GPIO_OUT_PORT09_PIN04
#define NEG_4_Ctrl GPIO_OUT_PORT09_PIN03
#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_8_Ctrl GPIO_OUT_PORT10_PIN03
#define NEG_9_Ctrl GPIO_OUT_PORT10_PIN04
......@@ -73,7 +73,7 @@
#define LINE_SafeBelt_4 NEG_4_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_4_press NEG_8_Ctrl
#define LINE_SafeBelt_5_press NEG_9_Ctrl
......@@ -101,9 +101,11 @@
#define LINE_OUT_NEG_10 GPIO_OUT_PORT00_PIN08
#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_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
......
......@@ -93,7 +93,6 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
// UART_Ch0_Send_Multiple_Byte(testdata,3);
// RS485_User_Tx_Data();
if(clearOdoFlag == 0)
{
backsend();
......@@ -152,7 +151,6 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
queren = 1;
}
}
}
......@@ -185,7 +183,7 @@ void Sys_Run_Mode_20ms_Tasks_Group0(void)
time100mssend = 0;
}
}
/*==============================================================================
......@@ -251,6 +249,7 @@ uint16_t u16LJSText;
uint32_t AutoTime = 160;
uint32_t ONOFFtime;
uint8_t compareresult;
uint8_t flashtime = 0;
void Sys_Run_Mode_100ms_Tasks_Group(void)
{
static uint32_t loc_timer = 0;
......@@ -281,9 +280,9 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
MENU_CHECK_STEP_ADD( );
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;
}
......@@ -316,29 +315,56 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
}
}
}
if(flashtime < 3)
{
flashtime++;
}
else
{
if(comparestart == 1)
{
compareresult = GetDataCompare();
Display_TFT_Clear();
// Display_TFT_Clear();
if(compareresult == 1)
{
TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_cuo1 );
comparestart = 2;
// comparestart = 2;
}
else
{
TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_dui1 );
comparestart = 2;
// comparestart = 2;
}
comparestart = 0;
Display_TFT_Clear();
}
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
{
;
Total_Check();
}
flashtime = 0;
}
//u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH;
}
......
......@@ -505,7 +505,7 @@ void RS485_User_Tx_Data(void)
}
void backsend(void)
{
if(RS485_send_time>=20)
if(RS485_send_time>=15)
{
RS485_send_time = 0;
RS485_TX_finish = 0;
......
......@@ -74,7 +74,7 @@ ADC_Data_st_t stADCData[ADC_SIGNAL_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] =
......@@ -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,},
{ 1U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit101,},
{ 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] =
......@@ -91,8 +89,6 @@ const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
{ 0U, 100000U, 0U, 0U,},
{ 0U, 100000U, 0U, 0U,},
{ 330000U, 47000U, 0U, 0U,},
{ 0U, 100000U, 0U, 0U,},
{ 0U, 100000U, 0U, 0U,},
};
/* Private function prototypes ----------------------------------------------*/
......
......@@ -30,13 +30,11 @@ enum ADCChName
ADC_CH_KL15_VOLTAGE = 0,
ADC_CH_KL30_VOLTAGE,
ADC_CH_10_VOLTAGE,
ADC_CH_left_VOLTAGE,
ADC_CH_right_VOLTAGE,
};
/* Exported macro ------------------------------------------------------------*/
#define ADC_TOTAL_CH_NUMBER (5U)
#define ADC_SIGNAL_CH_NUMBER (5U)
#define ADC_TOTAL_CH_NUMBER (3U)
#define ADC_SIGNAL_CH_NUMBER (3U)
#define ADC_REF_VOLTAGE u16ADCRefVoltage
/* Exported variables --------------------------------------------------------*/
......
......@@ -79,7 +79,7 @@ const uint8_t u8ADCChList[ADC_CONV_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,},
{ 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