Skip to content

Commit

Permalink
version 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinlyonsrepo committed Jul 15, 2024
1 parent ec056cb commit 1e4dee1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
5 changes: 4 additions & 1 deletion extras/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@
* Minor update.
* PROGMEM keyword added to font 12(which was added in 1.4.0
* DrawPixel method boundary scan adjusted so 90 and 270 degree rotation is
calibrated for whole screen not shared screen mode.
calibrated for whole screen not shared screen mode.
* Version 1.4.2 June 2024
* Minor update. Add back in pgm_read_byte command as it was removed on last update
so library works fully with UNO rev3.0
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ER_OLEDM1_CH1115
version=1.4.1
version=1.4.2
author=Gavin Lyons <glyons66@hotmail.com>
maintainer=Gavin Lyons <glyons66@hotmail.com>
sentence=Library to support the ER-OLEDM1.09-1 OLED Display Module driven by the CH1115 controller
Expand Down
2 changes: 1 addition & 1 deletion src/ER_OLEDM1_CH1115.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class ERMCH1115 : public ERMCH1115_graphics {
bool _sleep = true; /**< False awake/ON , true sleep/OFF */
uint8_t _OLEDcontrast = 0x80; /**< Contrast default 0x80 datasheet 00-FF */
uint16_t _HighFreqDelay = ERMCH1115_HIGHFREQ_DELAY; /**< uS GPIO Communications delay, SW SPI ONLY */
const uint16_t _LibVersionNum = 141; /**< Library version number 180 = 1.8.0*/
const uint16_t _LibVersionNum = 142; /**< Library version number 180 = 1.8.0*/
uint8_t _WidthScreen = 128; /**< Width of screen in pixels */
uint8_t _HeightScreen = 64; /**< Height of screen in pixels */

Expand Down
30 changes: 18 additions & 12 deletions src/ER_OLEDM1_CH1115_graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,22 +586,22 @@ CH1115_Return_Codes_e ERMCH1115_graphics::drawChar(int16_t x, int16_t y, unsigne
{
switch (_FontNumber) {
#ifdef CH1115_Font_One
case CH1115Font_Default : line = pFontDefaultptr[((character - _CurrentFontoffset) * _CurrentFontWidth) + i]; break;
case CH1115Font_Default : line = pgm_read_byte(pFontDefaultptr + ((character - _CurrentFontoffset) * _CurrentFontWidth) + i); break;
#endif
#ifdef CH1115_Font_Two
case CH1115Font_Thick : line = pFontThickptr[((character - _CurrentFontoffset) * _CurrentFontWidth) + i]; break;
case CH1115Font_Thick : line = pgm_read_byte(pFontThickptr+ ((character - _CurrentFontoffset) * _CurrentFontWidth) + i); break;
#endif
#ifdef CH1115_Font_Three
case CH1115Font_Seven_Seg : line = pFontSevenSegptr[((character - _CurrentFontoffset) * _CurrentFontWidth) + i]; break;
case CH1115Font_Seven_Seg: line = pgm_read_byte(pFontSevenSegptr + ((character - _CurrentFontoffset) * _CurrentFontWidth) + i); break;
#endif
#ifdef CH1115_Font_Four
case CH1115Font_Wide: line = pFontWideptr[((character - _CurrentFontoffset) * _CurrentFontWidth) + i]; break;
case CH1115Font_Wide : line = pgm_read_byte(pFontWideptr + ((character - _CurrentFontoffset) * _CurrentFontWidth) + i); break;
#endif
#ifdef CH1115_Font_Five
case CH1115Font_Tiny : line = pFontTinyptr[((character - _CurrentFontoffset) * _CurrentFontWidth) + i]; break;
case CH1115Font_Tiny : line = pgm_read_byte(pFontTinyptr + ((character - _CurrentFontoffset) * _CurrentFontWidth) + i); break;
#endif
#ifdef CH1115_Font_Six
case CH1115Font_Homespun: line = pFontHomeSpunptr[((character - _CurrentFontoffset) * _CurrentFontWidth) + i]; break;
case CH1115Font_Homespun : line = pgm_read_byte(pFontHomeSpunptr + ((character - _CurrentFontoffset) * _CurrentFontWidth) + i); break;
#endif
default: // wrong font number
return CH1115_WrongFont;
Expand Down Expand Up @@ -866,22 +866,28 @@ CH1115_Return_Codes_e ERMCH1115_graphics::drawChar(uint8_t x, uint8_t y, uint8_t
switch (_FontNumber)
{
#ifdef CH1115_Font_Seven
case CH1115Font_Bignum: ctemp = pFontBigNum16x32ptr[character - _CurrentFontoffset][i]; break;
case CH1115Font_Bignum:
ctemp = pgm_read_byte(&pFontBigNum16x32ptr[character - _CurrentFontoffset][i]);break;
#endif
#ifdef CH1115_Font_Eight
case CH1115Font_Mednum: ctemp = pFontMedNum16x16ptr[character - _CurrentFontoffset][i]; break;
case CH1115Font_Mednum:
ctemp = pgm_read_byte(&pFontMedNum16x16ptr[character - _CurrentFontoffset][i]); break;
#endif
#ifdef CH1115_Font_Nine
case CH1115Font_ArialRound: ctemp = pFontArial16x24ptr[character - _CurrentFontoffset][i]; break;
case CH1115Font_ArialRound:
ctemp = pgm_read_byte(&pFontArial16x24ptr[character - _CurrentFontoffset][i]);break;
#endif
#ifdef CH1115_Font_Ten
case CH1115Font_ArialBold: ctemp = pFontArial16x16ptr[character - _CurrentFontoffset][i]; break;
case CH1115Font_ArialBold:
ctemp = pgm_read_byte(&pFontArial16x16ptr[character - _CurrentFontoffset][i]);break;
#endif
#ifdef CH1115_Font_Eleven
case CH1115Font_Mia: ctemp = pFontMia8x16ptr[character - _CurrentFontoffset][i]; break;
case CH1115Font_Mia:
ctemp = pgm_read_byte(&pFontMia8x16ptr[character - _CurrentFontoffset][i]); break;
#endif
#ifdef CH1115_Font_Twelve
case CH1115Font_Dedica: ctemp = pFontDedica8x12ptr[character - _CurrentFontoffset][i]; break;
case CH1115Font_Dedica:
ctemp = pgm_read_byte(&pFontDedica8x12ptr[character - _CurrentFontoffset][i]); break;
#endif
default :
return CH1115_WrongFont;
Expand Down

0 comments on commit 1e4dee1

Please sign in to comment.