Exemple #1
0
void CWndToolbox::DoModal()
{
	BIOS::SYS::Beep(100);
	/*
#ifdef _WIN32
	// no enough ram for this on ARM M3 :(
	ui16 buffer[Width*Height];
	BIOS::LCD::GetImage( m_rcClient, buffer );
#endif
	*/
	m_bRunning = true;
	m_bFirst = true;
	m_bAdcEnabled = BIOS::ADC::Enabled();
	BIOS::ADC::Enable(false);

	if ( MainWnd.m_wndMenuInput.m_wndListTrigger.IsVisible() )
		MainWnd.m_wndMenuInput.m_wndListTrigger.Invalidate();
	if ( MainWnd.m_wndMenuInput.m_itmTrig.IsVisible() )
		MainWnd.m_wndMenuInput.m_itmTrig.Invalidate();

	CWnd* pSafeFocus = GetFocus();
	SetFocus();
	ShowWindow( CWnd::SwShow );
	Invalidate();
	while ( IsRunning() )
	{
		Sleep(20);
	}
	ShowWindow( CWnd::SwHide );
	/*
#ifdef _WIN32
	BIOS::LCD::PutImage( m_rcClient, buffer );
#endif*/

	switch ( GetResult() )
	{
	case MenuPauseResume: 
		// Resume / Pause
		m_bAdcEnabled = !m_bAdcEnabled;
		break;
	case MenuManager:
		m_bAdcEnabled = FALSE;
		// Load wave BIN
		break;
	case MenuReset:
		Settings.Reset();
		break;
	case -1: break;
	}

	UpdateAdc();

	pSafeFocus->SetFocus();

	CRect rcSafe = m_rcOverlay;
	m_rcOverlay.Invalidate();
	MainWnd.Invalidate(); // to redraw the graph
	m_rcOverlay = rcSafe;
}
Exemple #2
0
/*virtual*/ void CWndToolbox::ToggleAdc()
{
	m_bAdcEnabled = !BIOS::ADC::Enabled();
	UpdateAdc();
}