/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1987, 1991 by John E. Lloyd.			    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

#ifndef _CHASE_H_
#define _CHASE_H_

#include "../h/maxjnts.h"
#include "../h/robotControl.h"

typedef struct {

	float angTarget[MAXJNTS];
	float angSetpnt[MAXJNTS];
	float angSpeed[MAXJNTS];
	float angAccel[MAXJNTS];

	int   encTarget[MAXJNTS];
	int   encSetpnt[MAXJNTS];
	float encSpeed[MAXJNTS];
	float encAccel[MAXJNTS];

	int   controlLevelChange;
	int   controlLevel;

	float mTorque[MAXJNTS];
	float jTorque[MAXJNTS];
	char  torqueControl[MAXJNTS];

	int (*mTorqueFunction)();
	int (*jTorqueFunction)();

	unsigned long movecode;
	unsigned long compcode;
	char  block;
	char  stop;
	char  halt;
	char  synchronize;

	float liveZone;

	int (*monitorFxn)();
	int monitorArg;

	  } CHASE_CTRL;

#define MAX_CHASE_TASKS	4

#define TORQUE_ZERO	1
#define TORQUE_SETVALUE	2
#define TORQUE_FUNCTION 3

extern int chaseDrive();
extern int chaseStart();
extern int chaseRelease();

#endif
