#if !defined(AFX_SSUBCONTROL_H__C0EE639C_3FD5_445B_8241_858FC89DC332__INCLUDED_)
#define AFX_SSUBCONTROL_H__C0EE639C_3FD5_445B_8241_858FC89DC332__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SSubControl.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// SSubControl dialog

#define DEFAULTFRONTTHRESHOLD 50
#define DEFAULTRIGHTIDEAL 40
#define MAXIR             100
#define MINIR             10

#define DEFAULTPOLLINGCOUNT 1
#define MAXPOLLINGCOUNT 100
#define MINPOLLINGCOUNT 1
#define DEFAULTPOLLINGDELAY 50

#define DEFAULTERRORMARGIN 5
#define MAXERRORMARGIN 30
#define MINERRORMARGIN 0

#define DEFAULTDELAY 200
#define MINDELAY 0
#define MAXDELAY 20000

#define DEFAULTFWEXCEEDSPEED 4
#define DEFAULTFWEXCEEDANGLEADJUST 1
#define DEFAULTFWSTRAIGHTENSPEED 6
#define DEFAULTFWSTRAIGHTENANGLEADJUST 3
#define DEFAULTFWWITHINSPEED 8
#define DEFAULTFWWITHINANGLEADJUST 2

#define MAXSPEED 9
#define MINSPEED 0
#define MAXANGLE 9
#define MINANGLE 0



    


class SSubControl : public CDialog
{
// Construction
public:
	void SendUpdateMessage();
    BOOL Create();
	void LoadDefaults();
	SSubControl(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(SSubControl)
	enum { IDD = IDD_SUBCONTROL };
	int		m_ErrorMargin;
	int		m_FrontThreshold;
	int		m_RightIdeal;
	int		m_PollingDelay;
	int		m_PollingCount;
	int		m_WEAngleFactor;
	int		m_WESpeedFacotr;
	int		m_EEAngleFactor;
	int		m_EEDelayCount;
	int		m_EESpeedFactor;
	int		m_TAngleFactor;
	int		m_TDelayCount;
	int		m_TSpeedFactor;
	//}}AFX_DATA

    int		ActualErrorMargin;
	int		ActuaFrontThreshold;
	int		ActuaRightIdeal;
	int		ActuaPollingDelay;
	int		ActuaPollingCount;
	int		ActuaWEAngleFactor;
	int		ActuaWESpeedFacotr;
	int		ActuaEEAngleFactor;
	int		ActuaEEDelayCount;
	int		ActuaEESpeedFactor;
	int		ActuaTAngleFactor;
	int		ActuaTDelayCount;
	int		ActuaTSpeedFactor;

    CWnd* m_pParent; // used for modeless operations
	int m_nID;


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(SSubControl)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(SSubControl)
	afx_msg void OnKillfocusWespeedfactor();
	afx_msg void OnKillfocusWeanglefactor();
	afx_msg void OnKillfocusTspeedfactor();
	afx_msg void OnKillfocusTdelaycount();
	afx_msg void OnKillfocusTanglefactor();
	afx_msg void OnKillfocusRightideal();
	afx_msg void OnKillfocusPollingdelay();
	afx_msg void OnKillfocusPollingcount();
	afx_msg void OnKillfocusFrontthreshold();
	afx_msg void OnKillfocusErrormargin();
	afx_msg void OnKillfocusEespeedfactor();
	afx_msg void OnKillfocusEedelaycount();
	afx_msg void OnKillfocusEeanglefactor();
	virtual BOOL OnInitDialog();
	afx_msg void OnHide();
	afx_msg void OnDefaults();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SSUBCONTROL_H__C0EE639C_3FD5_445B_8241_858FC89DC332__INCLUDED_)
