diff options
| -rw-r--r-- | drivers/oled/oled_driver.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index e2cdc2fb7..079f5688f 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c | |||
| @@ -430,16 +430,16 @@ void oled_write_ln(const char *data, bool invert) { | |||
| 430 | 430 | ||
| 431 | void oled_pan(bool left) { | 431 | void oled_pan(bool left) { |
| 432 | uint16_t i = 0; | 432 | uint16_t i = 0; |
| 433 | for (uint16_t y = 0; y < OLED_DISPLAY_HEIGHT/8; y++) { | 433 | for (uint16_t y = 0; y < OLED_DISPLAY_HEIGHT / 8; y++) { |
| 434 | if(left) { | 434 | if (left) { |
| 435 | for (uint16_t x = 0; x < OLED_DISPLAY_WIDTH - 1; x++) { | 435 | for (uint16_t x = 0; x < OLED_DISPLAY_WIDTH - 1; x++) { |
| 436 | i = y * OLED_DISPLAY_WIDTH + x; | 436 | i = y * OLED_DISPLAY_WIDTH + x; |
| 437 | oled_buffer[i] = oled_buffer[i+1]; | 437 | oled_buffer[i] = oled_buffer[i + 1]; |
| 438 | } | 438 | } |
| 439 | } else { | 439 | } else { |
| 440 | for (uint16_t x = OLED_DISPLAY_WIDTH -1; x > 0; x--) { | 440 | for (uint16_t x = OLED_DISPLAY_WIDTH - 1; x > 0; x--) { |
| 441 | i = y * OLED_DISPLAY_WIDTH + x; | 441 | i = y * OLED_DISPLAY_WIDTH + x; |
| 442 | oled_buffer[i] = oled_buffer[i-1]; | 442 | oled_buffer[i] = oled_buffer[i - 1]; |
| 443 | } | 443 | } |
| 444 | } | 444 | } |
| 445 | } | 445 | } |
