#include "VSMD12XMovementTest.h"

MovementTest::MovementTest()
{

}

MovementTest::~MovementTest()
{
}

void MovementTest::SetTestParam(RunTimeGrabberParams  struRuntimeParams)
{
	m_struRuntimeParams = struRuntimeParams;
}

void MovementTest::TestAsLinearShutter()
{
	PortInfo piTemp;
	piTemp.qstrFullPortName = QString::fromStdString(m_struRuntimeParams.lscParam.strInterface);
	m_ctrlLS.ILMES_InitializeComm(piTemp, m_struRuntimeParams.lscParam.ucProtocolType, m_struRuntimeParams.lscParam.usCmdID);
	ControllerParams cpTemp;
	bool res = m_ctrlLS.ILMES_InitializeParams(cpTemp);
	m_ctrlLS.ILMES_SetPosition(m_struRuntimeParams.apsParams.iPosition, m_struRuntimeParams.apsParams.iTotalPosition);

	while (1)
	{
		m_ctrlLS.ILMES_MoveToPos(0);
		m_ctrlLS.ILMES_MoveToPos(m_struRuntimeParams.apsParams.iTotalPosition - 1);
	}
	
}

