Commit 74b3cb7f authored by 何锐's avatar 何锐

feat:爱玛检测台新加功能

parent 9968e820
......@@ -86,6 +86,20 @@ void MENU_CHECK_STEP_ADD(void)
{
MENU_CHECK_STEP = 1;
}
if((MENU_CHECK_STEP == 3) || (MENU_CHECK_STEP == 4))
{
if(Voltage_ACC < 50000) //72电使能
{
MENU_CHECK_STEP = 3;
}
if((keyVoltage_ACC < 3000) || (keyVoltage_ACC > 3300)) //按键检测
{
MENU_CHECK_STEP = 3;
}
}
}
void MENU_CHECK_STEP_SUB(void)
{
......@@ -681,7 +695,7 @@ void Function_Check_Ctrl(uint32_t cmd)
RELAY_KEY_MCU = 0;
break;
case 3: //上电指示灯自检
case 3: //上电指示灯自检 增加电源电压检测,按键电源检测
RELAY_KEY_MCU = 1;
break;
......
......@@ -4643,6 +4643,8 @@ void Display_Send_ODO(uint8_t fuel)
}
uint8_t CHECK_Value = 0;
uint8_t DIS_VALUE = 0;
uint32_t Voltage_ACC = 0;
uint32_t keyVoltage_ACC = 0;
const uint16_t Volatile[] = {90,80};
void Display_Send_Vspead(uint8_t menu)
{
......@@ -4651,9 +4653,6 @@ void Display_Send_Vspead(uint8_t menu)
uint8_t VSpeed_val = 0;
uint16_t GKDD_Voltage = 0;
uint16_t ZXSW_Voltage = 0;
uint16_t Voltage_left = 0;
uint16_t Voltage_right = 0;
uint16_t Voltage_ACC = 0;
// static uint8_t Type_Clear_FLAG = 0;
if ( (Type_Clear != menu ))
{
......@@ -4678,6 +4677,12 @@ void Display_Send_Vspead(uint8_t menu)
TFT_LCD_Draw_Bmp(5, 160, ( uint8_t * )gImage_aimaX0_Y0_6); //全亮
TFT_LCD_Draw_Bmp(5, 160 + 25, ( uint8_t * )gImage_aimaX0_Y0_4); //导航
TFT_LCD_Draw_Bmp(5, 160 + 25 + 25, ( uint8_t * )gImage_aimaX0_Y0_2); //按键
Voltage_ACC = ADC_Read_Signal(ADC_CH_ZXSW2_VOLTAGE); //3脚电平检测
GUI_General_Digit_Display(Voltage_ACC, Num_15, 6, 5, ODODigitNum09PosX, 160);
keyVoltage_ACC = ADC_Read_Signal(ADC_CH_KEYPOWER_VOLTAGE); //8脚电平检测
GUI_General_Digit_Display(keyVoltage_ACC, Num_15, 6, 5, ODODigitNum09PosX, 195);
break;
case 4:
......
......@@ -54,6 +54,8 @@ extern uint8_t ZTSVOK_B;
extern uint8_t RotationAlarmFlag;
extern uint8_t RotationAlarmMode;
extern uint8_t step_check;
extern uint32_t Voltage_ACC;
extern uint32_t keyVoltage_ACC;
void GeneralInfoDisp(unsigned char *p, unsigned short x, unsigned short y);
void Display_Title_Info(void);
void Display_Version_Info(uint32_t ON_OFF);
......
......@@ -46,7 +46,7 @@
/* ---------------------旧的-------------------------- */
#define SW10 GPIO_IN_PORT10_PIN02
#define LINE_OUT_NEG_01 GPIO_OUT_PORT09_PIN06 //12V
#define LINE_OUT_NEG_02 GPIO_OUT_PORT09_PIN05 //BAT
#define LINE_OUT_NEG_02 GPIO_OUT_PORT09_PIN05 //充电输出
#define LINE_OUT_NEG_03 GPIO_OUT_PORT09_PIN04 //BAT~
#define LINE_OUT_NEG_04 GPIO_OUT_PORT09_PIN03 //ACC1
......
......@@ -74,7 +74,7 @@ ADC_Data_st_t stADCData[ADC_SIGNAL_CH_NUMBER];
const uint8_t u8ADCChList[ADC_CONV_CH_NUMBER] =
{
9U, 5U, 11U, 8U, 7U, 14U, 15U,
9U, 5U, 11U, 8U, 7U, 14U, 15U, 13U, 12U
};
const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] =
......@@ -86,6 +86,8 @@ const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] =
{ 4U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
{ 5U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
{ 6U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
{ 7U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
{ 8U, 0U, 0U, 0U, 0U, 1U, ADC_Voltage_Calc_Circuit102,},
};
const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
......@@ -97,6 +99,8 @@ const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
{ 3300000U, 100000U, 0U, 0U,},
{ 0U, 1000000U, 0U, 0U,},
{ 0U, 1000000U, 0U, 0U,},
{ 3300000U, 100000U, 0U, 0U,},
{ 0U, 1000000U, 0U, 0U,},
};
/* Private function prototypes ----------------------------------------------*/
......
......@@ -34,11 +34,13 @@ enum ADCChName
ADC_CH_ACC1_VOLTAGE,
ADC_CH_ZTSB_VOLTAGE,
ADC_CH_ZTSA_VOLTAGE,
ADC_CH_ZXSW2_VOLTAGE, //3脚
ADC_CH_KEYPOWER_VOLTAGE, //8脚
};
/* Exported macro ------------------------------------------------------------*/
#define ADC_TOTAL_CH_NUMBER (7U)
#define ADC_SIGNAL_CH_NUMBER (7U)
#define ADC_TOTAL_CH_NUMBER (9U)
#define ADC_SIGNAL_CH_NUMBER (9U)
#define ADC_REF_VOLTAGE u16ADCRefVoltage
/* Exported variables --------------------------------------------------------*/
......
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