From aa22f29cc6fee4d9a03c87e365f5719cc07b5588 Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Sun, 27 Jul 2025 16:32:06 +0200 Subject: [PATCH 1/2] Add option to configure default screen Add DefaultScreen option to the minidexed.ini 0=Default 1=Performance Load Open the Performance>Load menu if Performance Load is set --- src/config.cpp | 2 ++ src/config.h | 4 ++++ src/minidexed.cpp | 2 ++ src/minidexed.ini | 3 +++ src/userinterface.cpp | 11 +++++++++++ src/userinterface.h | 2 ++ 6 files changed, 24 insertions(+) diff --git a/src/config.cpp b/src/config.cpp index 1f817f612..fdf018921 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 aaf247623..f27a757e0 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 257ef55ce..48fbfa912 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 ()) diff --git a/src/minidexed.ini b/src/minidexed.ini index 4d0f3895c..9fd595085 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 43a94ff46..be7242421 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 6290d865b..ba7daef96 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); From c507cb0a88cb62bf9509200ed8336c50299e3174 Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Sun, 27 Jul 2025 17:53:57 +0200 Subject: [PATCH 2/2] CMiniDexed: show Network Ready + IP instead of TG1 TG1 is misleading if the menu is not on it. Show only for for 3 seconds. --- src/minidexed.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 48fbfa912..6042e5dd5 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -2258,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) { @@ -2300,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);