⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jiema.c

📁 keil c open
💻 C
📖 第 1 页 / 共 4 页
字号:
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:27
*修改时间:2003-5-21 11:10
********************************************************************************
*/
#define	MOVE_CHARACTER	1
TASK	f_left(void)
{
	f_clear_flag();
	/*
	if(number_input_move==1)
	{
		sendtwo=MOVE_CHARACTER;
		sendthree=1;
		return;
	}
	*/
	if(start_privacy_set==0)
	{
		f_sub_left();
		sendtwo=0xc2;
		sendfour=0;
	}
	
	else
	{
		sendtwo=0x84;
		if(mark_length>=1)	mark_length--;
		sendtwo=0x84;
		sendthree=mark_length;
		sendfour=0x03;
		f_sendbytes();
	}
}
/*
*********************************************************************************
*右移函数
*修改参数:sendone,sendthree,sendtwo
*名称:TASK	f_right(void)
*功能:**右移函数
* 输入参数:无
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30
*********************************************************************************
*/
TASK	f_sub_right(void)
{
if(function1>0x80)
	{
		function1=0x80;

	}
	sendtwo=0xc0;
	sendthree=function1;
	sendfour=0;
}
/*
*******************************************************************************
*右移函数
*修改参数:sendone,sendthree,sendtwo
*名称:TASK	f_right(void)
*功能:**右移函数
* 输入参数:无
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30

*修改时间:2003-5-21 11:14
*****************************************************************************
*/
TASK	f_right(void)
{
	f_clear_flag();
	/*
	if(number_input_move==1)
	{
		sendtwo=MOVE_CHARACTER;
		sendthree=2;
		return;
	}*/
	if(start_privacy_set==0)
	{
		f_sub_right();
		sendtwo=0xc0;
		sendfour=0;
	}

	else
	{
		if(mark_length<=159)	mark_length++;
		sendtwo=0x84;
		sendthree=mark_length;
		sendfour=0x03;
		f_sendbytes();
	}
}
/*
************************************************************************************
*
*下移子函数
*修改参数:sendone,sendthree,sendtwo
*名称:TASK	f_sub_down(uchar y)
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30

*修改时间:2003-5-21 11:14

*
*2003-5-27 13:46
*************************************************************************************
*/
TASK	f_sub_down(uchar y)
{
	if(y>0x80)
	{
		y=0x80;

	}
	sendtwo=0xc2;
	sendthree=0;
	sendfour=y;
}
/*
****************************************************************************************
*功能:下移子函数
*修改参数:sendone,sendthree,sendtwo
*名称:TASK	f_down(uchar y)
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30

*修改时间:2003-5-21 11:14
****************************************************************************************
*/
TASK	f_down(void)
{
	f_clear_flag();
	/*
	if(number_input_move==1)
	{
		sendtwo=MOVE_CHARACTER;
		sendthree=1;
		return;
	}*/
	if(start_privacy_set==0)
	{
		f_sub_down(function1);
		sendtwo=0xc0;

	}
	else	
	{
		if(mark_width>=1)	mark_width--;
			sendtwo=0x84;
			sendthree=mark_width;
			sendfour=0x04;
			f_sendbytes();  
	}
}
/*
*************************************************************************************
*功能:上移子函数
*修改参数:sendone,sendthree,sendtwo
*名称:TASK	f_down(uchar y)
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30

*修改时间:2003-5-21 11:14
*修改时间:2003-5-21 11:16
******************************************************************************************
*/
TASK	f_sub_up(uchar y)
{
	if(y>0x80)
	{
		y=0x80;
	}
	sendtwo=0xc1;
	sendthree=0;
	sendfour=y;
}
/*
****************************************************************************************
*功能:上移子函数
*修改参数:sendone,sendthree,sendtwo
*名称:TASK	f_up(uchar y)
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:37
***************************************************************************************
*/

TASK	f_up(void)
{
	f_clear_flag();
	if(start_privacy_set==0)
	{
		f_sub_up(function1);
		sendtwo=0xc1;
	}
	else
	{
		if(mark_width<=119)	mark_width++;
			sendtwo=0x84;
			sendthree=mark_width;
			sendfour=0x04;
			f_sendbytes();
	}
}
/*
*****************************************************************************************
*功能:左上移子函数
*修改参数:sendone,sendthree,sendtwo
*名称:TASK	f_down(uchar y)
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:ccf
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30

*修改时间:2003-5-21 11:14
*向下运动
*
*
*修改时间:2003-5-21 11:16
*
*
*修改时间:2003-5-27 13:48
******************************************************************************************
*/
TASK	f_left_up(void)
{
	uchar	x=0;
		if(function1>0x80)
	function1=0x80;
	if(function2>0x80)
	function2=0x80;

//	if(number_input_move!=1)
	{
	//	if(black_screen==0)
		{
			f_clear_flag();
				sendone=0;
				sendtwo=0xc3;
				sendthree=function1;
				sendfour=function2;
		}
	}
}
/*
********************************************************************************************
*
*
******************************************************************************************
*/
TASK	f_left_down(void)
{
	uchar	x=0;
	if(function1>0x80)
	function1=0x80;
	if(function2>0x80)
	function2=0x80;
//	if(number_input_move!=1)
	{
	//	if(black_screen==0)
		{
			f_clear_flag();
			sendtwo=0xc2;
			sendthree=function1;
			sendfour=function2;
		}
	}
}
/*
**********************************************************************************************
*
*
*	2003-5-21 11:18
**********************************************************************************************
*/
TASK	f_right_up(void)
{
	uchar	x=0;
		if(function1>0x80)
	function1=0x80;
	if(function2>0x80)
	function2=0x80;	
	f_clear_flag();
	sendtwo=0xc1;
	sendthree=function1;
	sendfour=function2;	
}
/*
************************************************************************************************
**名称:TASK	f_right_down(void)
*功能:右下移子函数
*修改参数:sendone,sendthree,sendtwo
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30
*修改时间:
***********************************************************************************************
*/
TASK	f_right_down(void)
{
	if(function1>0x80)
	function1=0x80;
	if(function2>0x80)
	function2=0x80;
	f_clear_flag();
	sendtwo=0xc0;
	sendthree=function1;
	sendfour=function2;
}
/*
**************************************************************************************************
*名称:TASK	f_far(void)
*功能:调焦函数
*修改参数:sendone,sendthree,sendtwo
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30
*修改时间:
**************************************************************************************************
*/
TASK	f_far(void)
{
	f_clear_flag();
	 if(blue_gain_manu_flag==1)
	{
		sendtwo=0xd1;
		sendthree=1;
	}

	else	if(red_gain_manu_flag==1)
	{
		sendtwo=0xd0;
		sendthree=1;

	}
	else
	{
		sendtwo=0x80;
		sendthree=0x14;  //far
	}
}
/*
**********************************************************************************************8
**名称:TASK	f_near(void)
*功能:调焦函数
*修改参数:sendone,sendthree,sendtwo
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30
*修改时间:
**********************************************************************************************
*/
TASK	f_near(void)
{
	f_clear_flag();
/*	if(black_screen==1)
	{
		sendtwo=0x84;
		sendthree=0x09;

	}
	*/
		if(blue_gain_manu_flag==1)
	{
		sendtwo=0xd1;
		sendthree=0;

	}

	else	if(red_gain_manu_flag==1)
	{
		sendtwo=0xd0;
		sendthree=0;

	}

	else
	{
				
		sendtwo=0x80;
		sendthree=0x15;  //near

	}
}
/*
***********************************************************************************************
**名称:TASK	f_close(void)
*功能:关镜头函数
*修改参数:sendone,sendthree,sendtwo
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30
**********************************************************************************************
*/
TASK	f_close(void)
{
	f_clear_flag();
	sendtwo=0x80;
	sendthree=0x10;  //close
}
/*
***********************************************************************************************
**名称:TASK	f_open(void)
*功能:开镜头函数
*修改参数:sendone,sendthree,sendtwo
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30
***********************************************************************************************
*/
TASK	f_open(void)
{
	f_clear_flag();
	sendtwo=0x80;
	sendthree=0x11;  //open
}
/*
***********************************************************************************************
*名称:TASK	f_tele(void)
*功能:调整放大倍数函数
*修改参数:sendone,sendthree,sendtwo
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30
*
**********************************************************************************************
*/
TASK	f_tele(void)
{
	f_clear_flag();

	{
		sendtwo=0x80;
		sendthree=0x12;  //tele
	}

}
/*
**********************************************************************************************8
*名称:TASK	f_wide(void)
*功能:调整放大倍数函数
*修改参数:sendone,sendthree,sendtwo
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30
************************************************************************************************
*/
TASK	f_wide(void)
{
	f_clear_flag();
	if(privacy_start==0||start_privacy_set==1)
	{
		sendtwo=0x80;
		sendthree=0x13;  //wide
	}
	else
	{
		start_privacy_set=1;
	}

}
/*
**********************************************************************************************
*
*名称:TASK	f_F3on(void)
*功能:呼唤报警功能
*修改参数:sendone,sendthree,sendtwo
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30
************************************************************************************************
*/
TASK	f_F3on(void)
{
	f_clear_flag();
    sendone=0;
    sendtwo=0x13;
	sendthree=0;
}
/*
************************************************************************************************
*
*名称:TASK	f_F3off(void)
*功能:呼唤报警功能
*修改参数:sendone,sendthree,sendtwo
* 输入参数:速度值
*输出参数:无
*处理的数据:无
*调用的函数:	f_clear_flag();
*创建人:	DaiWei
*创建时间:2003-8-21 10:13
*修改时间:2003-8-21 10:30
*
*	2003-5-21 11:24

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -