Skip to content

Commit

Permalink
Merge pull request #28 from rzeldent:144-esp32-3248s035c-display-not-…
Browse files Browse the repository at this point in the history
…rotating

144-esp32-3248s035c-display-not-rotating
  • Loading branch information
rzeldent authored Mar 17, 2024
2 parents 505089b + 73f3b78 commit 237f3b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ void OnAddOneClicked(lv_event_t *e)
void OnRotateClicked(lv_event_t *e)
{
auto disp = lv_disp_get_default();
auto rotation = (lv_disp_rot_t)((lv_disp_get_rotation(disp) + 1) % LV_DISP_ROT_270);
auto rotation = (lv_disp_rot_t)((lv_disp_get_rotation(disp) + 1) % (LV_DISP_ROT_270 + 1));
lv_disp_set_rotation(disp, rotation);
}

void setup()
{
#ifdef ARDUINO_USB_CDC_ON_BOOT
#ifdef ARDUINO_USB_CDC_ON_BOOT
delay(5000);
#endif
#endif
Serial.begin(115200);
Serial.setDebugOutput(true);
log_i("Board: %s", BOARD_NAME);
Expand Down Expand Up @@ -50,7 +50,7 @@ void loop()
next_millis = now + 500;

char text_buffer[32];
sprintf(text_buffer, "%d", now);
sprintf(text_buffer, "%lu", now);
lv_label_set_text(ui_lblMillisecondsValue, text_buffer);

#ifdef BOARD_HAS_RGB_LED
Expand Down

0 comments on commit 237f3b8

Please sign in to comment.