diff --git a/src/config.cpp b/src/config.cpp index 1f817f61..fdf01892 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -220,6 +220,8 @@ void CConfig::Load (void) } m_nMasterVolume = m_Properties.GetNumber ("MasterVolume", 64); + + m_nDefaultScreen = m_Properties.GetNumber ("DefaultScreen", 0); } unsigned CConfig::GetToneGenerators (void) const diff --git a/src/config.h b/src/config.h index aaf24762..f27a757e 100644 --- a/src/config.h +++ b/src/config.h @@ -242,6 +242,8 @@ class CConfig // Configuration for MiniDexed unsigned GetMasterVolume() const { return m_nMasterVolume; } + unsigned GetDefaultScreen() const { return m_nDefaultScreen; } + // Network bool GetNetworkEnabled (void) const; bool GetNetworkDHCP (void) const; @@ -371,6 +373,8 @@ class CConfig // Configuration for MiniDexed unsigned m_bPerformanceSelectChannel; unsigned m_nMasterVolume; // Master volume 0-127 + + unsigned m_nDefaultScreen; // 0 Default, 1 Performance // Network bool m_bNetworkEnabled; diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 257ef55c..6042e5dd 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -367,6 +367,8 @@ bool CMiniDexed::Initialize (void) m_pSoundDevice->Start (); + m_UI.LoadDefaultScreen (); + #ifdef ARM_ALLOW_MULTI_CORE // start secondary cores if (!CMultiCoreSupport::Initialize ()) @@ -2256,6 +2258,14 @@ unsigned CMiniDexed::getModController (unsigned controller, unsigned parameter, } +static void UpdateScreen(TKernelTimerHandle hTimer, void *pParam, void *pContext) +{ + CUserInterface *pUI = static_cast (pContext); + assert (pUI); + + pUI->DisplayChanged (); +} + void CMiniDexed::UpdateNetwork() { if (!m_pNet) { @@ -2298,7 +2308,8 @@ void CMiniDexed::UpdateNetwork() LOGNOTE("FTP daemon not started (NetworkFTPEnabled=0)"); } - m_UI.DisplayWrite (IPString, "", "TG1", 0, 1); + m_UI.DisplayWrite (IPString, "", "Network ready", 0, 1); + CTimer::Get ()->StartKernelTimer (MSEC2HZ (3000), UpdateScreen, 0, &m_UI); m_pmDNSPublisher = new CmDNSPublisher (m_pNet); assert (m_pmDNSPublisher); diff --git a/src/minidexed.ini b/src/minidexed.ini index 4d0f3895..9fd59508 100644 --- a/src/minidexed.ini +++ b/src/minidexed.ini @@ -16,6 +16,9 @@ QuadDAC8Chan=0 # Master Volume (0-127) MasterVolume=64 +# Default "Boot" Screen ( 0=TG1 (default); 1=Performance Load ) +DefaultScreen=0 + # MIDI MIDIBaudRate=31250 #MIDIThru=umidi1,ttyS1 diff --git a/src/userinterface.cpp b/src/userinterface.cpp index 43a94ff4..be724242 100644 --- a/src/userinterface.cpp +++ b/src/userinterface.cpp @@ -199,6 +199,17 @@ bool CUserInterface::Initialize (void) return true; } +void CUserInterface::LoadDefaultScreen () +{ + // performance load + if (m_pConfig->GetDefaultScreen() == 1) + { + m_Menu.EventHandler (CUIMenu::MenuEventStepDown); + m_Menu.EventHandler (CUIMenu::MenuEventSelect); + m_Menu.EventHandler (CUIMenu::MenuEventSelect); + } +} + void CUserInterface::Process (void) { if (m_pLCDBuffered) diff --git a/src/userinterface.h b/src/userinterface.h index 6290d865..ba7daef9 100644 --- a/src/userinterface.h +++ b/src/userinterface.h @@ -42,6 +42,8 @@ class CUserInterface bool Initialize (void); + void LoadDefaultScreen (); + void Process (void); void ParameterChanged (void);