balltracecommand.h

来自「关于机器人的手臂程序」· C头文件 代码 · 共 76 行

H
76
字号

// File: BallTraceCommand.h
// Purpose: 
// Created: 01-DEC-2005  by Grandar
//
// Comments:
// General comments go here, for example:
// - command line options
// - file formats
// - rules and conventions
// - descriptions of the main data structures
//
// Revisions:
// 01-DEC-2005 Jiang
// Added ... 
//
#ifndef BALLTRACE_COMMAND_H__
#define BALLTRACE_COMMAND_H__

#include "IASRSystem.h"

#define UNKNOWN		0
#define	OUTSIGHT	1
#define HORZ_LEFT	(1<<1)
#define HORZ_RIGHT	(1<<2)
#define VERT_FOR	(1<<3)
#define VERT_BACK	(1<<4)
#define HORZ_MIDDLE	(1<<5)
#define VERT_MIDDLE	(1<<6)

#define	X1	110
#define	X2	210
#define	Y1	130
#define	Y2	180

typedef LONG	CUR_STATE;

typedef struct 
{	
	CUR_STATE	nState;
	int	nBaseSpeed;
	int	nAddSpeed;
	int	nDiffSpeed;
	int	nLastSpeed;
}TRACER_PARAM;

interface IASRFootball;
interface IASRMotion;
interface IASRImage;
class  CBallTraceCommand:public IASRCommand
{
public:
	BOOL bMove;
	int ID[MAXPCUBE];
	void Work();
	int m_Step;
	virtual HERROR  __stdcall Execute(LPVOID pObject);

	int speedLeft;
	int speedRight;

	CBallTraceCommand();
	virtual ~CBallTraceCommand();
	//static unsigned __stdcall CounterProc(LONG nOwner,void* pResult);
private:
    void 	TraceDecide(int nArea,int x,int y);
	TRACER_PARAM	m_TraceParam;
	IASRFootball* m_pImageProcess;
	IASRImage*	      m_pImage;
	IASRMotion*	m_pMotion;
	inline	void	Keep();
	long allCodeRight;
	long allCodeLeft;
};

#endif

⌨️ 快捷键说明

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