Skip to content

Commit

Permalink
format code according to conventions [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
qmk-bot committed Mar 7, 2020
1 parent 833c5ae commit 2306c97
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/oled/oled_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,16 +430,16 @@ void oled_write_ln(const char *data, bool invert) {

void oled_pan(bool left) {
uint16_t i = 0;
for (uint16_t y = 0; y < OLED_DISPLAY_HEIGHT/8; y++) {
if(left) {
for (uint16_t y = 0; y < OLED_DISPLAY_HEIGHT / 8; y++) {
if (left) {
for (uint16_t x = 0; x < OLED_DISPLAY_WIDTH - 1; x++) {
i = y * OLED_DISPLAY_WIDTH + x;
oled_buffer[i] = oled_buffer[i+1];
i = y * OLED_DISPLAY_WIDTH + x;
oled_buffer[i] = oled_buffer[i + 1];
}
} else {
for (uint16_t x = OLED_DISPLAY_WIDTH -1; x > 0; x--) {
i = y * OLED_DISPLAY_WIDTH + x;
oled_buffer[i] = oled_buffer[i-1];
for (uint16_t x = OLED_DISPLAY_WIDTH - 1; x > 0; x--) {
i = y * OLED_DISPLAY_WIDTH + x;
oled_buffer[i] = oled_buffer[i - 1];
}
}
}
Expand Down

0 comments on commit 2306c97

Please sign in to comment.