diff --git a/src/config.cpp b/src/config.cpp index 9f2d9834..d456c58e 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -114,6 +114,7 @@ void CConfig::Load (void) m_nST7789Width = m_Properties.GetNumber ("ST7789Width", 240); m_nST7789Height = m_Properties.GetNumber ("ST7789Height", 240); m_nST7789Rotation = m_Properties.GetNumber ("ST7789Rotation", 0); + m_bST7789SmallFont = m_Properties.GetNumber ("ST7789SmallFont", 0) != 0; m_nLCDColumns = m_Properties.GetNumber ("LCDColumns", 16); m_nLCDRows = m_Properties.GetNumber ("LCDRows", 2); @@ -367,6 +368,10 @@ unsigned CConfig::GetST7789Rotation (void) const return m_nST7789Rotation; } +bool CConfig::GetST7789SmallFont (void) const +{ + return m_bST7789SmallFont; +} unsigned CConfig::GetLCDColumns (void) const { return m_nLCDColumns; diff --git a/src/config.h b/src/config.h index bb6bbc5b..71bb5adf 100644 --- a/src/config.h +++ b/src/config.h @@ -113,7 +113,7 @@ class CConfig // Configuration for MiniDexed unsigned GetSPIClockKHz (void) const; // ST7789 LCD - bool GetST7789Enabled (void) const; + bool GetST7789Enabled (void) const; unsigned GetST7789Data (void) const; unsigned GetST7789Select (void) const; unsigned GetST7789Reset (void) const; @@ -121,6 +121,7 @@ class CConfig // Configuration for MiniDexed unsigned GetST7789Width (void) const; unsigned GetST7789Height (void) const; unsigned GetST7789Rotation (void) const; + bool GetST7789SmallFont (void) const; unsigned GetLCDColumns (void) const; unsigned GetLCDRows (void) const; @@ -236,6 +237,7 @@ class CConfig // Configuration for MiniDexed unsigned m_nST7789Width; unsigned m_nST7789Height; unsigned m_nST7789Rotation; + unsigned m_bST7789SmallFont; unsigned m_nLCDColumns; unsigned m_nLCDRows; diff --git a/src/minidexed.ini b/src/minidexed.ini index f2421b29..de9f1500 100644 --- a/src/minidexed.ini +++ b/src/minidexed.ini @@ -62,6 +62,7 @@ SSD1306LCDMirror=0 # Data = GPIO pin number # Optional: Reset, Backlight = GPIO pin numbers # Rotation=0,90,180,270 +# SmallFont=0 (default), 1 # # For a 240 wide display set LCDColumns=15 with LCDRows=2 SPIBus= @@ -73,6 +74,7 @@ ST7789Backlight= ST7789Width=240 ST7789Height=240 ST7789Rotation=0 +ST7789SmallFont=0 # Default is 16x2 display (e.g. HD44780) LCDColumns=16 diff --git a/src/userinterface.cpp b/src/userinterface.cpp index a8af0739..9e7c112e 100644 --- a/src/userinterface.cpp +++ b/src/userinterface.cpp @@ -95,7 +95,8 @@ bool CUserInterface::Initialize (void) if (m_pST7789Display->Initialize()) { m_pST7789Display->SetRotation (m_pConfig->GetST7789Rotation()); - m_pST7789 = new CST7789Device (m_pSPIMaster, m_pST7789Display, m_pConfig->GetLCDColumns (), m_pConfig->GetLCDRows ()); + bool bLargeFont = !(m_pConfig->GetST7789SmallFont()); + m_pST7789 = new CST7789Device (m_pSPIMaster, m_pST7789Display, m_pConfig->GetLCDColumns (), m_pConfig->GetLCDRows (), bLargeFont, bLargeFont); if (m_pST7789->Initialize()) { LOGDBG ("LCD: ST7789"); diff --git a/submod.sh b/submod.sh index f627cdb6..c13dca3a 100755 --- a/submod.sh +++ b/submod.sh @@ -12,7 +12,7 @@ cd - # # Optional update submodules explicitly cd circle-stdlib/libs/circle -git checkout f8c9026 +git checkout 4155f43 cd - cd circle-stdlib/libs/circle-newlib #git checkout develop