Removed ButtonEnabled from config

pull/274/head
Stephen Brown 3 years ago
parent 1ad0560335
commit 74d2dc626d
  1. 6
      src/config.cpp
  2. 2
      src/config.h
  3. 1
      src/minidexed.ini
  4. 27
      src/userinterface.cpp

@ -81,7 +81,6 @@ void CConfig::Load (void)
m_nLCDPinData7 = m_Properties.GetNumber ("LCDPinData7", 25);
m_nLCDI2CAddress = m_Properties.GetNumber ("LCDI2CAddress", 0);
m_bButtonEnabled = m_Properties.GetNumber ("ButtonEnabled", 0) != 0;
m_nButtonPinPrev = m_Properties.GetNumber ("ButtonPinPrev", NOPIN);
m_nButtonPinNext = m_Properties.GetNumber ("ButtonPinNext", NOPIN);
m_nButtonPinBack = m_Properties.GetNumber ("ButtonPinBack", NOPIN);
@ -187,11 +186,6 @@ unsigned CConfig::GetLCDI2CAddress (void) const
return m_nLCDI2CAddress;
}
bool CConfig::GetButtonEnabled (void) const
{
return m_bButtonEnabled;
}
unsigned CConfig::GetButtonPinPrev (void) const
{
return m_nButtonPinPrev;

@ -93,7 +93,6 @@ public:
// GPIO Button Navigation
// GPIO pin numbers are chip numbers, not header positions
bool GetButtonEnabled (void) const;
unsigned GetButtonPinPrev (void) const;
unsigned GetButtonPinNext (void) const;
unsigned GetButtonPinBack (void) const;
@ -135,7 +134,6 @@ private:
unsigned m_nLCDPinData7;
unsigned m_nLCDI2CAddress;
bool m_bButtonEnabled;
unsigned m_nButtonPinPrev;
unsigned m_nButtonPinNext;
unsigned m_nButtonPinBack;

@ -34,7 +34,6 @@ LCDI2CAddress=0x00
#
# Although actually any buttons set to 255 will be ignored
#
ButtonEnabled=1
ButtonPinPrev=16
ButtonPinNext=20
ButtonPinBack=5

@ -87,24 +87,21 @@ bool CUserInterface::Initialize (void)
LOGDBG ("LCD initialized");
}
if (m_pConfig->GetButtonEnabled ())
m_pUIButtons = new CUIButtons ( m_pConfig->GetButtonPinPrev (),
m_pConfig->GetButtonPinNext (),
m_pConfig->GetButtonPinBack (),
m_pConfig->GetButtonPinSelect (),
m_pConfig->GetButtonPinHome ());
assert (m_pUIButtons);
if (!m_pUIButtons->Initialize ())
{
m_pUIButtons = new CUIButtons ( m_pConfig->GetButtonPinPrev (),
m_pConfig->GetButtonPinNext (),
m_pConfig->GetButtonPinBack (),
m_pConfig->GetButtonPinSelect (),
m_pConfig->GetButtonPinHome ());
assert (m_pUIButtons);
if (!m_pUIButtons->Initialize ())
{
return false;
}
return false;
}
m_pUIButtons->RegisterEventHandler (UIButtonsEventStub, this);
m_pUIButtons->RegisterEventHandler (UIButtonsEventStub, this);
LOGDBG ("Button User Interface initialized");
}
LOGDBG ("Button User Interface initialized");
if (m_pConfig->GetEncoderEnabled ())
{

Loading…
Cancel
Save