File tree Expand file tree Collapse file tree 1 file changed +19
-19
lines changed Expand file tree Collapse file tree 1 file changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -59,37 +59,37 @@ OLEDDisplay::~OLEDDisplay() {
5959
6060bool OLEDDisplay::allocateBuffer () {
6161
62- logBufferSize = 0 ;
63- logBufferFilled = 0 ;
64- logBufferLine = 0 ;
65- logBufferMaxLines = 0 ;
66- logBuffer = NULL ;
62+ logBufferSize = 0 ;
63+ logBufferFilled = 0 ;
64+ logBufferLine = 0 ;
65+ logBufferMaxLines = 0 ;
66+ logBuffer = NULL ;
6767
6868 if (!this ->connect ()) {
6969 DEBUG_OLEDDISPLAY (" [OLEDDISPLAY][init] Can't establish connection to display\n " );
7070 return false ;
7171 }
7272
7373 if (this ->buffer ==NULL ) {
74- this ->buffer = (uint8_t *) malloc ((sizeof (uint8_t ) * displayBufferSize) + getBufferOffset ());
75- this ->buffer += getBufferOffset ();
74+ this ->buffer = (uint8_t *) malloc ((sizeof (uint8_t ) * displayBufferSize) + getBufferOffset ());
75+ this ->buffer += getBufferOffset ();
7676
77- if (!this ->buffer ) {
78- DEBUG_OLEDDISPLAY (" [OLEDDISPLAY][init] Not enough memory to create display\n " );
79- return false ;
80- }
77+ if (!this ->buffer ) {
78+ DEBUG_OLEDDISPLAY (" [OLEDDISPLAY][init] Not enough memory to create display\n " );
79+ return false ;
80+ }
8181 }
8282
8383 #ifdef OLEDDISPLAY_DOUBLE_BUFFER
8484 if (this ->buffer_back ==NULL ) {
85- this ->buffer_back = (uint8_t *) malloc ((sizeof (uint8_t ) * displayBufferSize) + getBufferOffset ());
86- this ->buffer_back += getBufferOffset ();
87-
88- if (!this ->buffer_back ) {
89- DEBUG_OLEDDISPLAY (" [OLEDDISPLAY][init] Not enough memory to create back buffer\n " );
90- free (this ->buffer - getBufferOffset ());
91- return false ;
92- }
85+ this ->buffer_back = (uint8_t *) malloc ((sizeof (uint8_t ) * displayBufferSize) + getBufferOffset ());
86+ this ->buffer_back += getBufferOffset ();
87+
88+ if (!this ->buffer_back ) {
89+ DEBUG_OLEDDISPLAY (" [OLEDDISPLAY][init] Not enough memory to create back buffer\n " );
90+ free (this ->buffer - getBufferOffset ());
91+ return false ;
92+ }
9393 }
9494 #endif
9595
You can’t perform that action at this time.
0 commit comments