Skip to content

[PXCT-161] Added rotation instructions for SqaureLine #2255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,20 @@ void loop() {
}
```

## Rotating the SquareLine UI

If there is a need to rotate the UI created in SqaureLine on the GIGA Display Shield, there is one line that needs to be added to one of the exported library files. In the **ui -> src** folder, find the `ui.c` file and open it.

The lvgl code we need to add is:

```arduino
lv_display_set_rotation(dispp, rotation);
```

Where `rotation` can be set to `0`, `90`, `180` or `270` depending on how much you want to rotate the UI.

![Rotation code added to ui.c file](assets/ui_rotation.png)

## Next Step

If you are curious about how LVGL works with the GIGA Display Shield, take a look at our [LVGL Guide](/tutorials/giga-display-shield/lvgl-guide).
Expand Down
Loading