#ifndef _LAPBOXINTASK_H
#define _LAPBOXINTASK_H

#include "ErrorHandler.h"
#include "LapBoxTaskControl.h"
#include "LapBoxMicro.h"
#include "IviewControl.h"

// MBM additions for joystick offset nulling (7.2.01)
#define JOYSTICK_DEADBAND	0.025	// deadband value (MBM 7.2.01)
#define JOYSTICK_INIT_COUNT	50	// length of JS initialize average (MBM 26.7.01)
#define JOYSTICK_INIT_DEADBAND	0.2	// JS initialize deadband (MBM 26.7.01)
#define AVG_INPUT_CLIP		0.150 	// clip value for offset estimate 
#define A1	 		0.9996858900723
#define B0	 		0.0001570549638
#define B1	 		0.0001570549638

class LapBoxInTask : public ErrorHandler
{
  public:

  LapBoxInTask(LapBoxTaskControl *taskParams, LapBoxMicro *micro, 
               IviewControl *iviewControlPT, IviewControl *iviewControlZFI);

  ~LapBoxInTask();

  int run();
  
  protected:

  LapBoxTaskControl *_taskParams;
  IviewControl *_iviewControlPT;
  IviewControl *_iviewControlZFI;
  LapBoxMicro  *_micro;
  SEM_ID        _wakeupSem;       /* Used by watch dog to wake up this task*/
};



#endif
