@@ -64,7 +64,7 @@ bool OLEDDisplay::allocateBuffer() {
6464 logBufferLine = 0 ;
6565 logBufferMaxLines = 0 ;
6666 logBuffer = NULL ;
67-
67+
6868 if (!this ->connect ()) {
6969 DEBUG_OLEDDISPLAY (" [OLEDDISPLAY][init] Can't establish connection to display\n " );
7070 return false ;
@@ -84,7 +84,7 @@ bool OLEDDisplay::allocateBuffer() {
8484 if (this ->buffer_back ==NULL ) {
8585 this ->buffer_back = (uint8_t *) malloc ((sizeof (uint8_t ) * displayBufferSize) + getBufferOffset ());
8686 this ->buffer_back += getBufferOffset ();
87-
87+
8888 if (!this ->buffer_back ) {
8989 DEBUG_OLEDDISPLAY (" [OLEDDISPLAY][init] Not enough memory to create back buffer\n " );
9090 free (this ->buffer - getBufferOffset ());
@@ -830,7 +830,7 @@ int OLEDDisplay::_putc(int c) {
830830 uint8_t textHeight = pgm_read_byte (fontData + HEIGHT_POS);
831831 uint16_t lines = this ->displayHeight / textHeight;
832832 uint16_t chars = 2 * (this ->displayWidth / textHeight);
833-
833+
834834 if (this ->displayHeight % textHeight)
835835 lines++;
836836 if (this ->displayWidth % textHeight)
@@ -847,24 +847,24 @@ void OLEDDisplay::setGeometry(OLEDDISPLAY_GEOMETRY g, uint16_t width, uint16_t h
847847 this ->geometry = g;
848848
849849 switch (g) {
850- case GEOMETRY_128_64:
851- this ->displayWidth = 128 ;
852- this ->displayHeight = 64 ;
853- break ;
854- case GEOMETRY_128_32:
855- this ->displayWidth = 128 ;
856- this ->displayHeight = 32 ;
857- break ;
850+ case GEOMETRY_128_64:
851+ this ->displayWidth = 128 ;
852+ this ->displayHeight = 64 ;
853+ break ;
854+ case GEOMETRY_128_32:
855+ this ->displayWidth = 128 ;
856+ this ->displayHeight = 32 ;
857+ break ;
858858 case GEOMETRY_64_48:
859859 this ->displayWidth = 64 ;
860860 this ->displayHeight = 48 ;
861- break ;
862- case GEOMETRY_RAWMODE:
863- this ->displayWidth = width > 0 ? width : 128 ;
864- this ->displayHeight = height > 0 ? height : 64 ;
865- break ;
861+ break ;
862+ case GEOMETRY_RAWMODE:
863+ this ->displayWidth = width > 0 ? width : 128 ;
864+ this ->displayHeight = height > 0 ? height : 64 ;
865+ break ;
866866 }
867- this ->displayBufferSize = displayWidth * displayHeight /8 ;
867+ this ->displayBufferSize = displayWidth * displayHeight / 8 ;
868868}
869869
870870void OLEDDisplay::sendInitCommands (void ) {
0 commit comments