#ifndef __BUBBLE_ADCSTETUP__
#define __BUBBLE_ADCSTETUP__

#define Bubble_Alarm_Value	 700	//气泡阀值为1000
#define Bubble_Alarm_Value_Down 200 //气泡阀值为350
#define BLOCKING_ALARM_DATA  80    	//堵塞报警阀值
#define BLOCKING_ALARM_DATA2 1000   //堵塞报警阀值,检测一个周期内最大值减去最小值，是否大于这个阀值
#define BLOCKING_ALARM_DATA3 1500   //堵塞报警阀值,检测一个周期，是否大于这个阀值

#define BOX_ALARM_UPPER_DATA 1650  	//未装药盒报警上限阀值
#define BOX_ALARM_LOWER_DATA 1300  	//未装药盒报警下限阀值
#define BOX_ALARM_DATA       800  	//未装药盒报警下限阀值

#define ELECT_DISCONT_DATA   150   //电机失控阀值

void OPB350L_ADCInit(void);
void OPB350L_ADCGet( void );
void Electricity_ADCGet( void );
void Electricity_WorkOffGet( void );


extern uint16_t BubbleData;        //气泡检测数据
extern uint16_t BubbleCheckTime;   //气泡检测时间
extern uint16_t BubbleCheckFlag;   //气泡检测时间到，置位该标志
extern uint16_t BubbleCounts;      //气泡检测次数
extern uint8_t  BubbleCountFlag;   //气泡采集次数完成标志，置位该标志

extern uint16_t ElectricityCheckFlag;   //电流检测时间到，置位该标志	
extern uint16_t ElectricityCheckTime;   //电流检测时间
extern uint16_t ElectricityCounts;      //电流检测次数
extern uint16_t ElectricityData;        //气泡检测数据
extern uint16_t ElectricityDatabf;		//气泡检测最大数据
extern uint8_t  ElectCountFlag;         //电流采集次数完成标志，置位该标志
extern uint16_t ElectricityOffTime;      //电机关闭时电流检测时间 
extern uint16_t ElectricityOFFflag;       //电机关闭时电流检测时间到，置位该标志	
extern uint16_t ElectricityOffData;        //电流检测数据
extern uint16_t ElectricityDatabf;      //电流检测数据备份
#endif
