#ifndef APP_ADAS_H
#define APP_ADAS_H

#define ADAS_LIANG_TIME  (100)
#define ADAS_ZONG_TIME    (200)


#define ADAS_ARRAY_JU_LI_MAX    (5)
#define ADAS_JU_LI_JING    (40)
#define ADAS_PWM_SENDING_MAX_TIME    (2500)
#define YIN_SU                       (0.34F) //unit:mm/us


enum
{
	ADAS_RECEIVE_0,
	ADAS_RECEIVE_1,
	ADAS_RECEIVE_2	
};
extern uint8_t adas_receive_stag;
extern uint16_t ju_li_1;//cm
extern uint16_t ju_li_2;//cm

//END CTR
#define KEY_ADAS_COMMON          (0x5200)
#define KEY_ADAS_ENABLE          (0x5201)
#define KEY_ADAS_SELF_UP         (0x5280)



void ADAS_Measure_Finish_Ju_Li_1(void);

void ADAS_Measure_Finish_Ju_Li_2(void);

void ADAS_PWM_1_Enable(void);

void ADAS_PWM_2_Enable(void);

void ADAS_Timeout(void);

 void ADAS_Initial(void);

void Can_ADAS_Self_Send(CAN_FRAME*can_adas_frame);

int8_t Handle_Can_Adas_CMD(CAN_FRAME*can_adas_frame);

int8_t Rsp_Can_Adas_CMD(CAN_FRAME*can_adas_frame);

void ADAS_Enable(uint8_t enable);

#endif

