File tree Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,10 @@ class SH1106Brzo : public OLEDDisplay {
6262
6363 void display (void ) {
6464 #ifdef OLEDDISPLAY_DOUBLE_BUFFER
65- uint8_t minBoundY = ~ 0 ;
65+ uint8_t minBoundY = UINT8_MAX ;
6666 uint8_t maxBoundY = 0 ;
6767
68- uint8_t minBoundX = ~ 0 ;
68+ uint8_t minBoundX = UINT8_MAX ;
6969 uint8_t maxBoundX = 0 ;
7070 uint8_t x, y;
7171
@@ -88,7 +88,7 @@ class SH1106Brzo : public OLEDDisplay {
8888 // If the minBoundY wasn't updated
8989 // we can savely assume that buffer_back[pos] == buffer[pos]
9090 // holdes true for all values of pos
91- if (minBoundY == ~ 0 ) return ;
91+ if (minBoundY == UINT8_MAX ) return ;
9292
9393 byte k = 0 ;
9494 uint8_t sendBuffer[17 ];
Original file line number Diff line number Diff line change @@ -65,10 +65,10 @@ class SH1106Spi : public OLEDDisplay {
6565
6666 void display (void ) {
6767 #ifdef OLEDDISPLAY_DOUBLE_BUFFER
68- uint8_t minBoundY = ~ 0 ;
68+ uint8_t minBoundY = UINT8_MAX ;
6969 uint8_t maxBoundY = 0 ;
7070
71- uint8_t minBoundX = ~ 0 ;
71+ uint8_t minBoundX = UINT8_MAX ;
7272 uint8_t maxBoundX = 0 ;
7373
7474 uint8_t x, y;
@@ -92,7 +92,7 @@ class SH1106Spi : public OLEDDisplay {
9292 // If the minBoundY wasn't updated
9393 // we can savely assume that buffer_back[pos] == buffer[pos]
9494 // holdes true for all values of pos
95- if (minBoundY == ~ 0 ) return ;
95+ if (minBoundY == UINT8_MAX ) return ;
9696
9797 // Calculate the colum offset
9898 uint8_t minBoundXp2H = (minBoundX + 2 ) & 0x0F ;
Original file line number Diff line number Diff line change @@ -65,10 +65,10 @@ class SH1106Wire : public OLEDDisplay {
6565
6666 void display (void ) {
6767 #ifdef OLEDDISPLAY_DOUBLE_BUFFER
68- uint8_t minBoundY = ~ 0 ;
68+ uint8_t minBoundY = UINT8_MAX ;
6969 uint8_t maxBoundY = 0 ;
7070
71- uint8_t minBoundX = ~ 0 ;
71+ uint8_t minBoundX = UINT8_MAX ;
7272 uint8_t maxBoundX = 0 ;
7373
7474 uint8_t x, y;
@@ -92,7 +92,7 @@ class SH1106Wire : public OLEDDisplay {
9292 // If the minBoundY wasn't updated
9393 // we can savely assume that buffer_back[pos] == buffer[pos]
9494 // holdes true for all values of pos
95- if (minBoundY == ~ 0 ) return ;
95+ if (minBoundY == UINT8_MAX ) return ;
9696
9797 // Calculate the colum offset
9898 uint8_t minBoundXp2H = (minBoundX + 2 ) & 0x0F ;
Original file line number Diff line number Diff line change @@ -62,10 +62,10 @@ class SSD1306Brzo : public OLEDDisplay {
6262
6363 void display (void ) {
6464 #ifdef OLEDDISPLAY_DOUBLE_BUFFER
65- uint8_t minBoundY = ~ 0 ;
65+ uint8_t minBoundY = UINT8_MAX ;
6666 uint8_t maxBoundY = 0 ;
6767
68- uint8_t minBoundX = ~ 0 ;
68+ uint8_t minBoundX = UINT8_MAX ;
6969 uint8_t maxBoundX = 0 ;
7070
7171 uint8_t x, y;
@@ -89,7 +89,7 @@ class SSD1306Brzo : public OLEDDisplay {
8989 // If the minBoundY wasn't updated
9090 // we can savely assume that buffer_back[pos] == buffer[pos]
9191 // holdes true for all values of pos
92- if (minBoundY == ~ 0 ) return ;
92+ if (minBoundY == UINT8_MAX ) return ;
9393
9494 sendCommand (COLUMNADDR);
9595 sendCommand (minBoundX);
Original file line number Diff line number Diff line change @@ -74,10 +74,10 @@ class SSD1306Spi : public OLEDDisplay {
7474
7575 void display (void ) {
7676 #ifdef OLEDDISPLAY_DOUBLE_BUFFER
77- uint8_t minBoundY = ~ 0 ;
77+ uint8_t minBoundY = UINT8_MAX ;
7878 uint8_t maxBoundY = 0 ;
7979
80- uint8_t minBoundX = ~ 0 ;
80+ uint8_t minBoundX = UINT8_MAX ;
8181 uint8_t maxBoundX = 0 ;
8282
8383 uint8_t x, y;
@@ -101,7 +101,7 @@ class SSD1306Spi : public OLEDDisplay {
101101 // If the minBoundY wasn't updated
102102 // we can savely assume that buffer_back[pos] == buffer[pos]
103103 // holdes true for all values of pos
104- if (minBoundY == ~ 0 ) return ;
104+ if (minBoundY == UINT8_MAX ) return ;
105105
106106 sendCommand (COLUMNADDR);
107107 sendCommand (minBoundX);
Original file line number Diff line number Diff line change @@ -62,10 +62,10 @@ class SSD1306Wire : public OLEDDisplay {
6262 initI2cIfNeccesary ();
6363 const int x_offset = (128 - this ->width ()) / 2 ;
6464 #ifdef OLEDDISPLAY_DOUBLE_BUFFER
65- uint8_t minBoundY = ~ 0 ;
65+ uint8_t minBoundY = UINT8_MAX ;
6666 uint8_t maxBoundY = 0 ;
6767
68- uint8_t minBoundX = ~ 0 ;
68+ uint8_t minBoundX = UINT8_MAX ;
6969 uint8_t maxBoundX = 0 ;
7070 uint8_t x, y;
7171
@@ -89,7 +89,7 @@ class SSD1306Wire : public OLEDDisplay {
8989 // we can savely assume that buffer_back[pos] == buffer[pos]
9090 // holdes true for all values of pos
9191
92- if (minBoundY == ( uint8_t )(~ 0 ) ) return ;
92+ if (minBoundY == UINT8_MAX ) return ;
9393
9494 sendCommand (COLUMNADDR);
9595 sendCommand (x_offset + minBoundX);
You can’t perform that action at this time.
0 commit comments