Example #1
0
/*
 * Function:	WorkerLoop
 *
 * Description:	called from the base class (periodically)
 *
 * Parameters:
 *		int		count
 * 
 * Return Values
 *		none
 *
 * Discussion:
 *				performs the diagnostic
 */
void
TCDSti::WorkerLoop(void)
{
	// if we are are ready working, discontinue;
	if (m_Continue == TRUE)
		m_Continue = FALSE;
	else
	{
		m_Continue = TRUE;
		m_StiButton.SetWindowText("Cancel");
		// disable movement
		m_StiRotateCCButton.EnableWindow(FALSE);
		m_StiRotateCButton.EnableWindow(FALSE);
		m_StiMoveUpButton.EnableWindow(FALSE);
		m_StiMoveLeftButton.EnableWindow(FALSE);
		m_StiMoveDownButton.EnableWindow(FALSE);
		m_StiMoveRightButton.EnableWindow(FALSE);
		m_Slider.EnableWindow(FALSE);
		EnableLedButtons(FALSE);

		TestOuterDome();
//		if (m_Continue == TRUE) //F404 vc6版中已刪除
//			TestSplitter();

		// report on overall results
		CString diag = "Dome LED Tests: Completed: ";
		m_DiagPF     = (m_DomePF == DIAG_PASSED && m_SplitterPF == DIAG_PASSED)
							? DIAG_PASSED : DIAG_FAILED;
		if (m_DiagPF == DIAG_PASSED)
			DiagReport(diag, DIAG_PASSED);
		else
			DiagReport(diag, DIAG_FAILED);
	}

	// redraw the screen
	GetLeds();
	SnapShot(150, 100);

	m_StiButton.SetWindowText("STI Lights");

	m_StiRotateCCButton.EnableWindow(TRUE);
	m_StiRotateCButton.EnableWindow(TRUE);
	m_StiMoveUpButton.EnableWindow(TRUE);
	m_StiMoveLeftButton.EnableWindow(TRUE);
	m_StiMoveDownButton.EnableWindow(TRUE);
	m_StiMoveRightButton.EnableWindow(TRUE);
	m_Slider.EnableWindow(TRUE);
	EnableLedButtons(TRUE);

	// kill the worker thread
	KillWorkerThread();
	m_Continue   = FALSE;
}
Example #2
0
/*
 * Function:	TestOuterDome
 *
 * Description:	test the main part of the LED dome
 *
 * Parameters:
 *		none
 * 
 * Return Values
 *		none
 *
 * Discussion:
 *				 
 */
void
TCDSti::TestOuterDome(void)
{
	int column, row, domecolumns, domerows;

	DomeReset();
	domecolumns = 40;
	domerows =  (m_DomeType == STANDARD) ? 10 : 12;

	// for each LED
	for (row = 0; row < domerows; row++)
	{
		for (column = 0; column < domecolumns; column++)
		{
			if (m_DomeType == STANDARD)
				TestLedSTD(row, column);
			else
				TestLedHC1(row, column);

			SpectrumSleep(500); //500 usec

			if (m_Continue == FALSE)
				break;
		}
		if (m_Continue == FALSE)
			break;
	}

	CString diag = "Outer Dome LED Tests: Completed: ";
	DiagReport(diag, m_DomePF);
}
Example #3
0
/*
 * Function:	TestSplitter
 *
 * Description:	test the beam splitter
 *
 * Parameters:
 *		none
 * 
 * Return Values
 *		none
 *
 * Discussion:
 *				 
 */
void
TCDSti::TestSplitter(void)
{
	int column, row, domecolumns, domerows;

	DomeReset();

	if (m_SystemType == C51134)
	{

	}
	else
	{  // as handbuilt by Royster
		domecolumns = 47;
		domerows    = 22;
		// rows 22 & 23
		for (row = 21; row <= domerows; row++)
		{
			// columns 41 thru 46
			for (column = 42; column <= domecolumns; column++)
			{
				if (m_Continue == FALSE)
					break;
				TestLedSTD(row, column);
				SpectrumSleep(500);  // prevent dutycycle shutdown
			}
			if (m_Continue == FALSE)
				break;
		}
			TestLedSTD(23, 41); // center LED
			Sleep(10);
	}

	CString diag = "Dome Splitter LED Tests: Completed: ";
	DiagReport(diag, m_SplitterPF);
}
Example #4
0
void MainVisitor::ReportIllegalBarrierCast(SourceLocation location)
{
    DiagReport(location, _diagIllegalBarrierCast);
}
Example #5
0
void MainVisitor::ReportUnbarriedField(SourceLocation location)
{
    DiagReport(location, _diagUnbarrieredField);
}