Merge branch 'Issue421Fix' of github.com:diyelectromusic/MiniDexed into Issue421Fix

pull/422/head
diyelectromusic 2 years ago
commit 67a69b8cb3
  1. 7
      .github/workflows/build.yml
  2. 12
      src/config.cpp
  3. 4
      src/config.h
  4. 13
      src/minidexed.cpp
  5. 2
      src/minidexed.ini
  6. 4
      src/userinterface.cpp

@ -20,11 +20,14 @@ jobs:
run: |
set -ex
git submodule update --init --recursive
- name: Use Circle develop branch for WM8960 and i2c display support until it is merged upstream
- name: Use Circle develop branch for SSD1306 display rotation support until it is merged upstream
run: |
set -ex
cd circle-stdlib/
git checkout e318f89 # Needed to support Circle develop?
cd -
cd circle-stdlib/libs/circle
git checkout 646c362 # develop
git checkout ec09d7e # develop
cd -
- name: Install toolchains
run: |

@ -84,6 +84,8 @@ void CConfig::Load (void)
m_nSSD1306LCDI2CAddress = m_Properties.GetNumber ("SSD1306LCDI2CAddress", 0);
m_nSSD1306LCDWidth = m_Properties.GetNumber ("SSD1306LCDWidth", 128);
m_nSSD1306LCDHeight = m_Properties.GetNumber ("SSD1306LCDHeight", 32);
m_bSSD1306LCDRotate = m_Properties.GetNumber ("SSD1306LCDRotate", 0) != 0;
m_bSSD1306LCDMirror = m_Properties.GetNumber ("SSD1306LCDMirror", 0) != 0;
m_nLCDColumns = m_Properties.GetNumber ("LCDColumns", 16);
m_nLCDRows = m_Properties.GetNumber ("LCDRows", 2);
@ -231,6 +233,16 @@ unsigned CConfig::GetSSD1306LCDHeight (void) const
return m_nSSD1306LCDHeight;
}
bool CConfig::GetSSD1306LCDRotate (void) const
{
return m_bSSD1306LCDRotate;
}
bool CConfig::GetSSD1306LCDMirror (void) const
{
return m_bSSD1306LCDMirror;
}
unsigned CConfig::GetLCDColumns (void) const
{
return m_nLCDColumns;

@ -93,6 +93,8 @@ public:
unsigned GetSSD1306LCDI2CAddress (void) const;
unsigned GetSSD1306LCDWidth (void) const;
unsigned GetSSD1306LCDHeight (void) const;
bool GetSSD1306LCDRotate (void) const;
bool GetSSD1306LCDMirror (void) const;
unsigned GetLCDColumns (void) const;
unsigned GetLCDRows (void) const;
@ -167,6 +169,8 @@ private:
unsigned m_nSSD1306LCDI2CAddress;
unsigned m_nSSD1306LCDWidth;
unsigned m_nSSD1306LCDHeight;
bool m_bSSD1306LCDRotate;
bool m_bSSD1306LCDMirror;
unsigned m_nLCDColumns;
unsigned m_nLCDRows;

@ -948,13 +948,7 @@ void CMiniDexed::ProcessSound (void)
assert (CConfig::ToneGenerators == 8);
// swap stereo channels if needed
uint8_t indexL=0, indexR=1;
if (m_bChannelsSwapped)
{
indexL=1;
indexR=0;
}
// BEGIN TG mixing
float32_t tmp_float[nFrames*2];
@ -1003,6 +997,13 @@ void CMiniDexed::ProcessSound (void)
}
// END adding reverb
// swap stereo channels if needed prior to writing back out
if (m_bChannelsSwapped)
{
indexL=1;
indexR=0;
}
// Convert dual float array (left, right) to single int16 array (left/right)
for(uint16_t i=0; i<nFrames;i++)
{

@ -34,6 +34,8 @@ LCDI2CAddress=0x00
SSD1306LCDI2CAddress=0x0
SSD1306LCDWidth=128
SSD1306LCDHeight=32
SSD1306LCDRotate=0
SSD1306LCDMirror=0
# Default is 16x2 display (e.g. HD44780)
LCDColumns=16

@ -58,7 +58,9 @@ bool CUserInterface::Initialize (void)
unsigned i2caddr = m_pConfig->GetLCDI2CAddress ();
unsigned ssd1306addr = m_pConfig->GetSSD1306LCDI2CAddress ();
if (ssd1306addr != 0) {
m_pSSD1306 = new CSSD1306Device (m_pConfig->GetSSD1306LCDWidth (), m_pConfig->GetSSD1306LCDHeight (), m_pI2CMaster, ssd1306addr);
m_pSSD1306 = new CSSD1306Device (m_pConfig->GetSSD1306LCDWidth (), m_pConfig->GetSSD1306LCDHeight (),
m_pI2CMaster, ssd1306addr,
m_pConfig->GetSSD1306LCDRotate (), m_pConfig->GetSSD1306LCDMirror ());
LOGDBG ("LCD: SSD1306");
if (!m_pSSD1306->Initialize ())
{

Loading…
Cancel
Save