BOOL OPositionTracker::SetupDevice( VOID )
{
	FLOAT pv[3] = {.0f, .0f, 1.0f}; 
	g_pdiDev.SetSHemisphere(-1,(PDI3vec)pv);
	g_pdiDev.StartPipeExport();
	AddResultMsg("StartPipeExport");

	std::string msg;

	g_pdiDev.SetSDataList( -1, g_pdiMDat );
	AddResultMsg("SetSDataList");

	CPDIbiterr cBE;
	g_pdiDev.GetBITErrs( cBE );
	AddResultMsg("GetBITErrs");

	CHAR sz[100];
	cBE.Parse( sz, 100 );
	msg = "BIT Errors: " + std::string(sz) + "\r\n";
	AddMsg(msg);

	if (!(cBE.IsClear()))
	{
		g_pdiDev.ClearBITErrs();
		AddResultMsg("ClearBITErrs");
	}

	UpdateStationMap();

	return TRUE;
}
Пример #2
0
VOID CPDImfcDlg::SetupDevice( VOID )
{
    CString msg;

    BOOL bResult;
    bResult = m_pDev->SetSDataList( -1, m_pdiMDat );
    AddResultMsg(_T("SetSDataList"));

    if (!bResult)
    {
        m_pDev->GetSDataList( 1, m_pdiMDat );
        AddResultMsg(_T("GetSDataList"));
    }

    m_pDev->SetFrameRate( PI_FRATE_120 );
    AddResultMsg(_T("SetFrameRate"));

    m_pDev->SetMetric( TRUE );
    AddResultMsg(_T("SetMetric"));

    CPDIbiterr cBE;
    m_pDev->GetBITErrs( cBE );
    AddResultMsg(_T("GetBITErrs"));

    TCHAR sz[200];
    cBE.Parse( sz, 200 );
    msg.Format(_T("BIT Errors: %s\r\n"), sz );
    AddMsg(msg);

    if (!(cBE.IsClear()))
    {
        m_pDev->ClearBITErrs();
        AddResultMsg(_T("ClearBITErrs"));
    }

    UpdateStationMap();
}