Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
13 changes: 12 additions & 1 deletion src/minidexed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ())
Expand Down Expand Up @@ -2256,6 +2258,14 @@ unsigned CMiniDexed::getModController (unsigned controller, unsigned parameter,

}

static void UpdateScreen(TKernelTimerHandle hTimer, void *pParam, void *pContext)
{
CUserInterface *pUI = static_cast<CUserInterface *> (pContext);
assert (pUI);

pUI->DisplayChanged ();
}

void CMiniDexed::UpdateNetwork()
{
if (!m_pNet) {
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions src/minidexed.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions src/userinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/userinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class CUserInterface

bool Initialize (void);

void LoadDefaultScreen ();

void Process (void);

void ParameterChanged (void);
Expand Down
Loading