Skip to content
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

feat(sheild): Nice!view Added flag to rotate custom widget 180 degrees #2732

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions app/boards/shields/nice_view/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ config NICE_VIEW_WIDGET_STATUS
config NICE_VIEW_WIDGET_INVERTED
bool "Invert custom status widget colors"

config NICE_VIEW_ROTATE_180
bool "Rotates screen 180"


if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL

config NICE_VIEW_WIDGET_STATUS
Expand Down
8 changes: 8 additions & 0 deletions app/boards/shields/nice_view/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
```

## Rotate screen

You can rotate the custom widget by 180 degrees To use add the following item to your `.conf` file:

```
CONFIG_NICE_VIEW_ROTATE_180=y
```
170 changes: 170 additions & 0 deletions app/boards/shields/nice_view/widgets/art.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,90 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BALLOON u
0xff, 0xff, 0xff, 0xff, /*Color of index 1*/
#endif

#ifdef CONFIG_NICE_VIEW_ROTATE_180
0xfb, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xea, 0xaa, 0xab, 0xfe, 0xaf, 0xff, 0xff, 0x00, 0x00,
0x3f, 0xe6, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xfd, 0xf5, 0x57, 0x57, 0xff, 0x5d, 0xff,
0xff, 0x00, 0x00, 0x1f, 0xcf, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xae, 0xab,
0xff, 0xaf, 0xff, 0xfe, 0x00, 0x00, 0x3f, 0xcf, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xfd,
0xff, 0xd5, 0x55, 0xff, 0xdd, 0xff, 0xfc, 0x01, 0x54, 0x5f, 0xdf, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xbf, 0xff, 0xff, 0xfe, 0xab, 0xff, 0xef, 0xff, 0xf0, 0x0a, 0xaa, 0xab, 0x9f, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xfd, 0x55, 0xff, 0xdf, 0xff, 0xe5, 0x55, 0x55,
0x55, 0xbf, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xfe, 0xaa, 0xff, 0xaf, 0xff,
0xf2, 0xaa, 0xaa, 0xaf, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xfd, 0x55,
0x7f, 0xdf, 0xff, 0xf8, 0x55, 0x55, 0x58, 0x07, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfe, 0xaa, 0xbe, 0xff, 0xff, 0xfe, 0x2a, 0xaa, 0xa8, 0x07, 0xf0, 0xff, 0xdf, 0xbf,
0xdf, 0xff, 0xff, 0xff, 0xfd, 0x55, 0x55, 0xdf, 0xff, 0xff, 0x15, 0x55, 0x5f, 0xe7, 0xf0,
0xff, 0xff, 0xdf, 0xff, 0xfd, 0xff, 0xff, 0xfa, 0xaa, 0xaf, 0xff, 0xfd, 0xff, 0x8a, 0xaa,
0xab, 0xe7, 0xb0, 0xff, 0xdf, 0xcf, 0xdf, 0xfe, 0xff, 0xff, 0xdd, 0x55, 0x57, 0xdf, 0xff,
0xff, 0xc5, 0x54, 0x56, 0x07, 0x70, 0xff, 0xef, 0xef, 0xbf, 0xfe, 0xbf, 0xff, 0xfa, 0xaa,
0xab, 0xbf, 0xff, 0xff, 0xc2, 0xa8, 0x2a, 0x07, 0xb0, 0xff, 0xdf, 0xdf, 0xdf, 0xfc, 0x7f,
0xff, 0xdd, 0x55, 0x55, 0xff, 0xff, 0xff, 0xe1, 0x14, 0x07, 0xe7, 0x70, 0xff, 0xef, 0xdf,
0xff, 0xf2, 0x7f, 0xff, 0xba, 0xaa, 0xab, 0xff, 0xff, 0xff, 0xe0, 0x8a, 0x0f, 0xe7, 0xb0,
0xff, 0xdf, 0xbf, 0xff, 0xfc, 0xff, 0xff, 0xdd, 0x55, 0x55, 0xff, 0xbf, 0xff, 0xc0, 0x45,
0x08, 0x07, 0xf0, 0xff, 0xbf, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xbe, 0xaa, 0xaa, 0xff, 0xdf,
0xf7, 0xc0, 0x22, 0x88, 0x07, 0xf0, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x55,
0x5d, 0x7f, 0xbf, 0xcf, 0x80, 0x01, 0x0f, 0xff, 0xf0, 0xff, 0xbf, 0xfe, 0x00, 0x03, 0xff,
0xff, 0xfe, 0xaa, 0xba, 0xbf, 0xff, 0xbf, 0x80, 0x02, 0x88, 0x27, 0xf0, 0xff, 0xdf, 0xf0,
0x00, 0x7c, 0x00, 0x03, 0xff, 0xd5, 0x5d, 0x7f, 0xff, 0xdf, 0x00, 0x01, 0x48, 0x27, 0xf0,
0xff, 0xff, 0xc0, 0x20, 0x1f, 0xff, 0xfc, 0x1f, 0xaa, 0xaa, 0xbf, 0xff, 0xef, 0x00, 0x00,
0xa9, 0x27, 0xe0, 0xff, 0xdf, 0x80, 0x00, 0x0f, 0xff, 0xff, 0xf7, 0xd5, 0x55, 0x77, 0xff,
0xef, 0x00, 0x10, 0x49, 0x27, 0xd0, 0xff, 0xff, 0x20, 0x20, 0x03, 0xff, 0xff, 0xff, 0xaa,
0xaa, 0xbf, 0xfb, 0xf6, 0x00, 0x08, 0x28, 0x07, 0xa0, 0xff, 0xde, 0x54, 0x00, 0x00, 0x1f,
0xff, 0xff, 0xd5, 0x55, 0x7f, 0xff, 0xfc, 0x04, 0x04, 0x58, 0x07, 0xd0, 0xff, 0xfc, 0xa2,
0xaa, 0x01, 0x20, 0x7f, 0xff, 0xee, 0xaa, 0xbf, 0xff, 0xf8, 0x2a, 0x8a, 0x7f, 0xff, 0xa0,
0xff, 0xd9, 0x1f, 0x05, 0x40, 0xcf, 0x87, 0xff, 0xf7, 0x55, 0xdf, 0xff, 0xf0, 0x55, 0x44,
0x48, 0x07, 0xd0, 0xef, 0xfa, 0x7f, 0xaa, 0xa0, 0xf7, 0xfd, 0xff, 0xee, 0xaa, 0xff, 0xff,
0xc2, 0xaa, 0x82, 0x48, 0x07, 0xa0, 0xff, 0xf5, 0xff, 0xa5, 0x55, 0x79, 0xff, 0xff, 0xf7,
0x56, 0xff, 0xff, 0x81, 0x55, 0x41, 0x7f, 0xff, 0xd0, 0xef, 0xf3, 0xff, 0xaa, 0xaa, 0x1e,
0x7f, 0xff, 0xee, 0xab, 0x7f, 0xff, 0x00, 0x2a, 0xa2, 0x88, 0x1f, 0xe0, 0xdf, 0xf7, 0xe0,
0x00, 0x15, 0x60, 0x17, 0xff, 0xff, 0x56, 0xff, 0xfe, 0x00, 0x15, 0x41, 0x08, 0x1f, 0xf0,
0xef, 0xe6, 0x0a, 0xa8, 0x02, 0x3f, 0x80, 0x7f, 0xef, 0xae, 0xff, 0xfc, 0x00, 0x0a, 0xa2,
0x8f, 0xe7, 0xf0, 0xd7, 0xe1, 0x55, 0x24, 0x00, 0x00, 0xf5, 0x0f, 0xff, 0xd7, 0xff, 0xf1,
0x50, 0x05, 0x51, 0x4f, 0xe7, 0xf0, 0xef, 0xea, 0xaa, 0xaa, 0x00, 0x3d, 0x21, 0x73, 0xff,
0xef, 0xff, 0xe2, 0xaa, 0x02, 0xa0, 0xa8, 0x1f, 0xf0, 0xff, 0xe5, 0x55, 0x25, 0x00, 0x79,
0x05, 0x7e, 0xff, 0xd7, 0xff, 0xf8, 0x55, 0x05, 0x51, 0x48, 0x1f, 0xf0, 0xef, 0xea, 0xaa,
0xaa, 0x00, 0x3d, 0xe1, 0x7f, 0xff, 0xaf, 0xff, 0xfc, 0x2a, 0x82, 0xa8, 0xff, 0xff, 0xb0,
0xff, 0xe1, 0x55, 0x25, 0x00, 0x00, 0xf1, 0x7f, 0xff, 0x57, 0xff, 0xff, 0x85, 0x41, 0x51,
0x80, 0x67, 0x70, 0xef, 0xe6, 0x0a, 0xaa, 0x82, 0x3f, 0x80, 0x7f, 0xfe, 0xab, 0xff, 0xff,
0xe2, 0xa0, 0xa8, 0x80, 0x64, 0x70, 0xdf, 0xf7, 0xe0, 0x00, 0x15, 0x60, 0x17, 0x87, 0xff,
0x57, 0xdd, 0xff, 0xf1, 0x50, 0x54, 0xff, 0xfc, 0x70, 0xff, 0xf3, 0xff, 0xaf, 0xea, 0x1e,
0x7f, 0xf9, 0xfe, 0xab, 0xfe, 0xef, 0xf8, 0xa8, 0xa8, 0xa8, 0x24, 0x70, 0xff, 0xf5, 0xff,
0xaf, 0xd4, 0x79, 0xff, 0xff, 0x7f, 0x55, 0xfd, 0xf7, 0xfd, 0x54, 0x54, 0x58, 0x24, 0x70,
0xff, 0xfa, 0x7f, 0xaf, 0xe0, 0xe7, 0xff, 0xff, 0xff, 0xaa, 0xff, 0xff, 0xfc, 0xaa, 0x2a,
0xa9, 0x24, 0x30, 0xff, 0xf9, 0x1f, 0xaf, 0xc0, 0xdf, 0xff, 0xff, 0xff, 0xd5, 0x7f, 0xf7,
0xfe, 0x55, 0x15, 0x59, 0x24, 0x10, 0xff, 0xfc, 0xa3, 0xae, 0x21, 0x3f, 0xff, 0xff, 0xff,
0xaa, 0xbf, 0xef, 0xfe, 0x2a, 0xaa, 0xa8, 0x04, 0x00, 0xff, 0xfe, 0x54, 0x01, 0x50, 0x0f,
0xff, 0xf7, 0xff, 0xd5, 0x5f, 0xf7, 0xbf, 0x11, 0x15, 0x58, 0x04, 0x00, 0xff, 0xff, 0x2a,
0xaa, 0xa3, 0xf0, 0x0f, 0xfb, 0xff, 0xea, 0xaf, 0xff, 0xff, 0x28, 0x8a, 0xaf, 0xfc, 0x00,
0xff, 0xff, 0x95, 0x25, 0x4f, 0xff, 0xf3, 0xff, 0xff, 0xf7, 0x7f, 0xf7, 0xff, 0x84, 0x55,
0x09, 0x64, 0x00, 0xfb, 0xee, 0xca, 0xaa, 0x9f, 0xff, 0xfe, 0xfb, 0xdf, 0xfe, 0xff, 0xff,
0xfd, 0x82, 0xaa, 0x89, 0xa4, 0x20, 0xff, 0xf5, 0xf1, 0x24, 0x7f, 0xff, 0xff, 0xff, 0xe7,
0xf5, 0xff, 0xff, 0xfb, 0xc0, 0x55, 0x49, 0x64, 0x40, 0xfb, 0xf1, 0xfe, 0x00, 0x03, 0xff,
0xff, 0xfb, 0xdf, 0xeb, 0xff, 0xff, 0xfb, 0xe2, 0x2a, 0x89, 0xe4, 0xa0, 0xf7, 0xf3, 0xff,
0xff, 0xfc, 0x00, 0x7f, 0xf7, 0xf7, 0xf7, 0xff, 0xff, 0xf7, 0xf1, 0x15, 0x48, 0x06, 0x50,
0xfb, 0xe3, 0xff, 0xff, 0xff, 0xff, 0x83, 0xfb, 0xfb, 0xff, 0xff, 0xff, 0xef, 0xf8, 0x2a,
0xa8, 0x06, 0xa0, 0xf7, 0xc9, 0xff, 0xff, 0x7f, 0xff, 0xfc, 0x7f, 0xf7, 0xd7, 0xdf, 0xef,
0xf3, 0xf8, 0x15, 0x7f, 0xfe, 0x50, 0xfb, 0xbf, 0xfb, 0xff, 0xbf, 0xff, 0xff, 0xdb, 0xfb,
0xaf, 0xef, 0xff, 0xfd, 0xf8, 0x0a, 0xc8, 0x07, 0xb0, 0xf5, 0xff, 0xfd, 0xff, 0xf7, 0xff,
0xff, 0xff, 0xf7, 0x5f, 0xdf, 0xff, 0xfd, 0xf0, 0x05, 0x48, 0x07, 0x50, 0xfb, 0xff, 0xff,
0xff, 0xbb, 0xff, 0xff, 0xff, 0xfb, 0xaf, 0xef, 0xff, 0xfe, 0xf0, 0x02, 0xff, 0xff, 0x30,
0xf5, 0xff, 0xfd, 0xff, 0x7d, 0xff, 0xff, 0xff, 0x77, 0x5f, 0xd7, 0xff, 0xff, 0xe0, 0x05,
0x58, 0x07, 0x10, 0xfb, 0xff, 0xfb, 0xff, 0xbb, 0xff, 0xfb, 0xfa, 0xbb, 0xaf, 0xef, 0xff,
0xff, 0xc0, 0x02, 0xa8, 0x05, 0xa0, 0xfd, 0xff, 0xfd, 0xff, 0xdb, 0xff, 0xff, 0xf5, 0x55,
0x5f, 0x57, 0xff, 0xff, 0x10, 0x01, 0x59, 0xff, 0x90, 0xfb, 0xff, 0xfb, 0xff, 0xbf, 0xef,
0xfb, 0xea, 0xba, 0xae, 0xaf, 0xff, 0xfc, 0x08, 0x00, 0xa9, 0xff, 0x80, 0xff, 0xff, 0xfd,
0xff, 0x5f, 0xff, 0xff, 0xf5, 0x55, 0x5f, 0x5f, 0xff, 0xf0, 0x05, 0x01, 0x58, 0x07, 0x80,
0xfb, 0xff, 0xfb, 0xfe, 0xbf, 0xef, 0xff, 0xea, 0xba, 0xae, 0xaf, 0xff, 0xc0, 0x02, 0x80,
0xa8, 0x07, 0x00, 0xff, 0xff, 0xfd, 0xfd, 0x7f, 0xff, 0xff, 0xd5, 0x55, 0x57, 0x5f, 0xff,
0x00, 0x01, 0x40, 0x4f, 0xff, 0x40, 0xfb, 0xfb, 0xff, 0xfe, 0xbf, 0xef, 0xff, 0xea, 0xba,
0xaf, 0xef, 0xff, 0x82, 0xa0, 0xa8, 0x0a, 0xaf, 0xa0, 0xf7, 0xfd, 0xfd, 0xff, 0xff, 0xd7,
0xfd, 0xd5, 0x75, 0x57, 0xff, 0xff, 0xc5, 0x50, 0x54, 0x15, 0x47, 0x50, 0xff, 0xff, 0xff,
0xff, 0xbf, 0xef, 0xea, 0xea, 0xba, 0xab, 0xef, 0xff, 0xf2, 0xaa, 0x2a, 0x0a, 0xa2, 0xa0,
0xff, 0xfd, 0xfd, 0xff, 0x7f, 0xd7, 0xd5, 0x55, 0x55, 0x7d, 0xff, 0xff, 0xf8, 0x55, 0x15,
0x15, 0x52, 0x50, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xaa, 0xaa, 0xba, 0xff, 0xff, 0xff,
0xfe, 0x2a, 0x8a, 0x0a, 0xa8, 0xf0, 0xff, 0xfd, 0xff, 0xff, 0xf5, 0xd7, 0x55, 0x55, 0x75,
0xff, 0xff, 0xff, 0xff, 0x95, 0x45, 0x05, 0x57, 0xf0
#else
0xfe, 0xaa, 0x0a, 0x2a, 0x9f, 0xff, 0xff, 0xff, 0xfa, 0xea, 0xaa, 0xae, 0xba, 0xff, 0xff,
0xfb, 0xff, 0xf0, 0xf1, 0x55, 0x05, 0x15, 0x47, 0xff, 0xff, 0xff, 0xf5, 0xd5, 0x55, 0x5f,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xa4, 0xaa, 0x8a, 0x8a, 0xa1, 0xff, 0xff, 0xfb, 0xea,
Expand Down Expand Up @@ -108,6 +192,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BALLOON u
0xff, 0xff, 0xf0, 0xff, 0x3f, 0x80, 0x00, 0x0f, 0xff, 0xfb, 0xaf, 0xfe, 0xae, 0xaa, 0xfb,
0xff, 0xbf, 0xff, 0xff, 0xff, 0xf0, 0xf6, 0x7f, 0xc0, 0x00, 0x0f, 0xff, 0xff, 0x57, 0xfd,
0x55, 0x55, 0x77, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xf0,
#endif
};

const lv_img_dsc_t balloon = {
Expand All @@ -134,6 +219,90 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MOUNTAIN
0xff, 0xff, 0xff, 0xff, /*Color of index 1*/
#endif

#ifdef CONFIG_NICE_VIEW_ROTATE_180
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x30, 0x00, 0x70, 0x00, 0x02,
0xfe, 0x80, 0x00, 0x00, 0x00, 0x30, 0x80, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x60, 0x01,
0xc0, 0x00, 0x06, 0x3f, 0x40, 0x00, 0x00, 0x00, 0x10, 0x8f, 0xff, 0xff, 0xff, 0xff, 0x3f,
0xff, 0xc7, 0xff, 0x07, 0xff, 0xfc, 0x17, 0xff, 0xff, 0xff, 0xf8, 0x10, 0x98, 0x1f, 0xc0,
0x0f, 0xfe, 0x7f, 0x1c, 0x0f, 0xfe, 0x1f, 0xff, 0xfc, 0x01, 0xbf, 0xff, 0xff, 0xf0, 0x10,
0x90, 0x0f, 0xe0, 0x0f, 0xfe, 0xff, 0x38, 0x1f, 0xfc, 0x7f, 0xff, 0xf8, 0x00, 0x1b, 0xff,
0xff, 0xf0, 0x10, 0x90, 0x0f, 0xe0, 0x0f, 0xfc, 0xfe, 0x71, 0x3f, 0xf8, 0xff, 0xff, 0xf0,
0x00, 0x01, 0xbf, 0xff, 0xa0, 0x10, 0x90, 0x0f, 0xf0, 0x0f, 0xfd, 0xfc, 0xf3, 0xff, 0xf9,
0xff, 0xff, 0xe0, 0x00, 0x00, 0x1f, 0xfe, 0x40, 0x10, 0x90, 0x0f, 0xf0, 0x1f, 0xfb, 0xf9,
0xe3, 0xff, 0xf1, 0xff, 0xf3, 0xc0, 0x00, 0x03, 0x7f, 0xff, 0xe0, 0x10, 0x90, 0x0f, 0xf8,
0x1f, 0xff, 0xf3, 0xc7, 0xff, 0xe3, 0xff, 0xc0, 0x00, 0x00, 0x37, 0xff, 0xff, 0xf0, 0x10,
0x90, 0x07, 0xf8, 0x9f, 0xff, 0xf7, 0x8f, 0xff, 0xe7, 0xff, 0x80, 0x00, 0x06, 0x7f, 0xff,
0xff, 0xf0, 0x10, 0x90, 0x07, 0xff, 0x9f, 0xff, 0xef, 0x1f, 0xff, 0xe7, 0xfe, 0x00, 0x00,
0x2f, 0xff, 0xff, 0xff, 0xf8, 0x10, 0x90, 0x07, 0xff, 0xbf, 0xff, 0xdf, 0x3f, 0xff, 0xc7,
0xf8, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x10, 0x90, 0x27, 0xff, 0xbf, 0xff, 0xfe,
0x3f, 0xff, 0xcf, 0xe0, 0x00, 0x00, 0x17, 0xff, 0xff, 0xff, 0xf8, 0x10, 0x90, 0x67, 0xff,
0x3f, 0xff, 0xfc, 0x7f, 0xff, 0xcf, 0xe0, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff, 0xf0, 0x10,
0x98, 0x73, 0xff, 0x3f, 0xff, 0xf8, 0xff, 0xff, 0x8f, 0xc0, 0x00, 0x00, 0x00, 0x6f, 0xff,
0xff, 0xf0, 0x10, 0x9e, 0xf3, 0xff, 0x7f, 0xff, 0xf1, 0xff, 0xff, 0x9f, 0x80, 0x00, 0x00,
0x00, 0x05, 0xff, 0xff, 0xf0, 0x10, 0x9f, 0xfb, 0xff, 0x7f, 0xff, 0xe3, 0xff, 0xff, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xff, 0xe0, 0x10, 0x9f, 0xff, 0xff, 0x7f, 0xf1, 0x87,
0xff, 0xfe, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xff, 0xe0, 0x10, 0x9f, 0xff, 0xff,
0xff, 0xf0, 0x0f, 0xff, 0xfc, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x10,
0x97, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0xff, 0xf8, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b,
0xaf, 0xc0, 0x10, 0x93, 0xff, 0xff, 0xff, 0xe6, 0x3f, 0xff, 0xf1, 0x98, 0x00, 0x00, 0x00,
0x00, 0x00, 0xdf, 0xd5, 0x80, 0x10, 0x91, 0xff, 0xff, 0xff, 0xe7, 0x7e, 0x3f, 0xe3, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf8, 0x00, 0x10, 0x90, 0xff, 0xff, 0xff, 0xe7, 0xfc,
0x19, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xff, 0xf8, 0x00, 0x10, 0x90, 0x7f, 0xff,
0xff, 0xc7, 0xf0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xff, 0xf8, 0x06, 0x10,
0x90, 0x7f, 0xff, 0xff, 0x8f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff,
0xf8, 0x0f, 0x90, 0x91, 0x3f, 0xff, 0xfe, 0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x7f, 0xff, 0xf0, 0x1f, 0xf0, 0x91, 0xdf, 0xff, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1b, 0xff, 0xf0, 0x1b, 0xf0, 0x93, 0xef, 0xff, 0xf8, 0xf0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7f, 0xe0, 0x37, 0xf0, 0x9f, 0xff, 0xff,
0xf1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0xc0, 0x3f, 0xf0,
0x9f, 0xff, 0xff, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0xc0, 0x74, 0xd0, 0x9f, 0xff, 0xff, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x60, 0x6b, 0x30, 0x9f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x30, 0xdf, 0xf0, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x9f, 0xff, 0xf0, 0x80, 0x0f, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xff, 0xdf, 0x2f, 0xf0,
0x80, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xff,
0xcf, 0xd5, 0x70, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x06, 0xff, 0xff, 0xef, 0xfb, 0xb0, 0x9f, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x2f, 0xff, 0xff, 0xe5, 0xff, 0xf0, 0x9f, 0xff, 0xff, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7f, 0xff, 0xff, 0xe6, 0xbf, 0xf0, 0x9f, 0xff, 0xff,
0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0xff, 0xff, 0xff, 0xf3, 0x5a, 0xf0,
0x9f, 0x7d, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7f, 0xff, 0xff, 0xff,
0xf1, 0xf3, 0xb0, 0x9c, 0xfb, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff,
0xff, 0xff, 0xff, 0xf1, 0xf1, 0x50, 0x91, 0xf7, 0xf9, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xe1, 0xf0, 0x93, 0xe7, 0xf6, 0xff, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0xff, 0xff, 0xff, 0xf0, 0xe1, 0xf0, 0x97, 0xcf, 0xf6,
0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xf0, 0xc0, 0xd0,
0x9f, 0x9f, 0xf9, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0xff, 0xff,
0xf0, 0xc0, 0xf0, 0x9f, 0x3f, 0xff, 0xdf, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x06, 0xff, 0xff, 0xf0, 0x80, 0xd0, 0x9e, 0x7f, 0xff, 0xef, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5f, 0xff, 0xe0, 0x00, 0xf0, 0x9c, 0x7f, 0x7f, 0xef, 0xff, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xe0, 0x00, 0x70, 0x98, 0xfe, 0x7f,
0xef, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7, 0xff, 0xe0, 0x00, 0x70,
0x91, 0xfe, 0xff, 0xe7, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xff, 0xff,
0xc0, 0x00, 0x70, 0xa3, 0xfc, 0xff, 0xe7, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xaf, 0xff, 0xff, 0x80, 0x00, 0x30, 0xc7, 0x80, 0xff, 0xe7, 0xff, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x05, 0xff, 0xff, 0xfe, 0x43, 0x00, 0x30, 0x87, 0x00, 0xff, 0xc3, 0xff, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0xff, 0xff, 0xff, 0xf7, 0x80, 0x30, 0x8f, 0x01, 0xff,
0xc3, 0xfb, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x03, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x30,
0x9f, 0x01, 0xff, 0xc1, 0xfd, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x37, 0xff, 0xff, 0xff, 0xff,
0xff, 0xc0, 0x10, 0xbc, 0x01, 0xef, 0xc1, 0xfc, 0xfe, 0x00, 0x00, 0x00, 0x03, 0x7f, 0xff,
0xff, 0xff, 0xff, 0xff, 0xc0, 0x10, 0xd8, 0x01, 0xef, 0xe1, 0xfe, 0x7f, 0x00, 0x00, 0x00,
0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x10, 0x90, 0x03, 0xcf, 0xe0, 0xfe, 0x7f,
0x80, 0x00, 0x01, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x10, 0x90, 0x03, 0xdf,
0xc0, 0xff, 0x3f, 0xc0, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x10,
0x90, 0x03, 0xdf, 0x80, 0xff, 0x3f, 0xc0, 0x00, 0x00, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xe0, 0x10, 0x90, 0x07, 0xdf, 0x80, 0x7f, 0x1f, 0xe0, 0x00, 0x00, 0x1b, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xe0, 0x10, 0x90, 0x07, 0x9f, 0x80, 0x7e, 0x0f, 0xf0, 0x00, 0x00,
0x01, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x10, 0x98, 0x07, 0x9f, 0x00, 0x7c, 0x07,
0xf8, 0x00, 0x00, 0x00, 0x2f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x10, 0x8f, 0xff, 0x9f,
0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x10,
0x80, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xa0, 0x00, 0x00,
0x00, 0x00, 0x10, 0xc0, 0x00, 0x90, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07,
0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0
#else
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
0x00, 0x00, 0x00, 0x90, 0x00, 0x30, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xa0, 0x00, 0x00,
Expand Down Expand Up @@ -216,6 +385,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MOUNTAIN
0x00, 0x00, 0x10, 0xc0, 0x00, 0x00, 0x00, 0x17, 0xf4, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x00,
0x88, 0x00, 0x00, 0x00, 0x00, 0x30, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
#endif
};

const lv_img_dsc_t mountain = {
Expand Down
12 changes: 10 additions & 2 deletions app/boards/shields/nice_view/widgets/peripheral_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,25 @@ ZMK_DISPLAY_WIDGET_LISTENER(widget_peripheral_status, struct peripheral_status_s
output_status_update_cb, get_state)
ZMK_SUBSCRIPTION(widget_peripheral_status, zmk_split_peripheral_status_changed);

#ifdef CONFIG_NICE_VIEW_ROTATE_180 // sets positions for default and flipped canvases
int art_pos = 20;
int top_pos = 0;
#else
int art_pos = 0;
int top_pos = 92;
#endif

int zmk_widget_status_init(struct zmk_widget_status *widget, lv_obj_t *parent) {
widget->obj = lv_obj_create(parent);
lv_obj_set_size(widget->obj, 160, 68);
lv_obj_t *top = lv_canvas_create(widget->obj);
lv_obj_align(top, LV_ALIGN_TOP_RIGHT, 0, 0);
lv_obj_align(top, LV_ALIGN_TOP_LEFT, top_pos, 0);
lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR);

lv_obj_t *art = lv_img_create(widget->obj);
bool random = sys_rand32_get() & 1;
lv_img_set_src(art, random ? &balloon : &mountain);
lv_obj_align(art, LV_ALIGN_TOP_LEFT, 0, 0);
lv_obj_align(art, LV_ALIGN_TOP_LEFT, art_pos, 0);

sys_slist_append(&widgets, &widget->node);
widget_battery_status_init();
Expand Down
Loading