diff --git a/README.md b/README.md index d6f2a09..4acd95b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ -# nice_oled +# nice!oled ![Banner](./assets/banner.JPG) -nice_oled vertical widgets for oled screens in 128x32 portrait orientation with -zmk software. +nice_oled vertical widgets for oled screens with zmk (for split and non-split keyboards) Inspired/forked by the work of @M165437 with his [nice-view-gem](https://github.com/M165437/nice-view-gem). All credits to him for the original design and implementation. @@ -48,7 +47,8 @@ manifest: path: config ``` -2. In the `build.yaml` file, add the `nice_oled` shield. +2. In the `build.yaml` file, add the `nice_oled` shield (using the corne as an + example, but it could be another shield). ```diff --- @@ -88,3 +88,6 @@ Modify the behavior of this shield by adjusting these options in your personal c ## Inspiration - [nice-view-gem](https://github.com/M165437/nice-view-gem) by @M165437 - [nice-view-elemental](https://github.com/kevinpastor/nice-view-elemental) by @kevinpastor + +# If you like my contributions, please don't forget the following: +![Star](./assets/star.GIF) diff --git a/assets/animation.gif b/assets/animation.gif index 894c0fb..5691a29 100644 Binary files a/assets/animation.gif and b/assets/animation.gif differ diff --git a/assets/animation2.gif b/assets/animation2.gif new file mode 100644 index 0000000..894c0fb Binary files /dev/null and b/assets/animation2.gif differ diff --git a/assets/banner.JPG b/assets/banner.JPG index 15f7eeb..45395c5 100644 Binary files a/assets/banner.JPG and b/assets/banner.JPG differ diff --git a/assets/banner2.JPG b/assets/banner2.JPG new file mode 100644 index 0000000..15f7eeb Binary files /dev/null and b/assets/banner2.JPG differ diff --git a/assets/star.GIF b/assets/star.GIF new file mode 100644 index 0000000..0e0340f Binary files /dev/null and b/assets/star.GIF differ diff --git a/boards/.DS_Store b/boards/.DS_Store new file mode 100644 index 0000000..517473b Binary files /dev/null and b/boards/.DS_Store differ diff --git a/boards/shields/nice_oled/assets/custom_fonts.h b/boards/shields/nice_oled/assets/custom_fonts.h index 5cf6287..9fe180b 100644 --- a/boards/shields/nice_oled/assets/custom_fonts.h +++ b/boards/shields/nice_oled/assets/custom_fonts.h @@ -3,7 +3,7 @@ LV_FONT_DECLARE(pixel_operator_mono); LV_FONT_DECLARE(pixel_operator_mono_8); -// LV_FONT_DECLARE(pixel_operator_mono_12); +LV_FONT_DECLARE(pixel_operator_mono_12); // the default font is 16px as global // LV_FONT_DECLARE(pixel_operator_mono_16); diff --git a/boards/shields/nice_oled/assets/images.c b/boards/shields/nice_oled/assets/images.c index 1ec20bf..cec5647 100644 --- a/boards/shields/nice_oled/assets/images.c +++ b/boards/shields/nice_oled/assets/images.c @@ -8,16 +8,17 @@ #define LV_ATTRIBUTE_IMG_BOLT #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BOLT uint8_t bolt_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BOLT + uint8_t bolt_map[] = { #if CONFIG_NICE_VIEW_WIDGET_INVERTED - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ #else - 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ #endif - 0x08, 0x10, 0x20, 0x40, 0xf8, 0x10, 0x20, 0x40, 0x80, + 0x08, 0x10, 0x20, 0x40, 0xf8, 0x10, 0x20, 0x40, 0x80, }; const lv_img_dsc_t bolt = { @@ -34,17 +35,20 @@ const lv_img_dsc_t bolt = { #define LV_ATTRIBUTE_IMG_BT #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BT uint8_t bt_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BT + uint8_t bt_map[] = { #if CONFIG_NICE_VIEW_WIDGET_INVERTED - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ #else - 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ + + 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ #endif - 0xfb, 0xf0, 0xf9, 0xf0, 0xf8, 0xf0, 0xda, 0x70, 0xcb, 0x30, 0xe2, 0x70, 0xf0, 0xf0, 0xf9, - 0xf0, 0xf0, 0xf0, 0xe2, 0x70, 0xcb, 0x30, 0xda, 0x70, 0xf8, 0xf0, 0xf9, 0xf0, 0xfb, 0xf0, + 0xfb, 0xf0, 0xf9, 0xf0, 0xf8, 0xf0, 0xda, 0x70, 0xcb, 0x30, + 0xe2, 0x70, 0xf0, 0xf0, 0xf9, 0xf0, 0xf0, 0xf0, 0xe2, 0x70, + 0xcb, 0x30, 0xda, 0x70, 0xf8, 0xf0, 0xf9, 0xf0, 0xfb, 0xf0, }; const lv_img_dsc_t bt = { @@ -61,18 +65,19 @@ const lv_img_dsc_t bt = { #define LV_ATTRIBUTE_IMG_BT_NO_SIGNAL #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BT_NO_SIGNAL uint8_t - bt_no_signal_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST + LV_ATTRIBUTE_IMG_BT_NO_SIGNAL uint8_t bt_no_signal_map[] = { #if CONFIG_NICE_VIEW_WIDGET_INVERTED - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ -#else 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ +#else + 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ #endif - 0xfb, 0xf0, 0x79, 0xf0, 0x38, 0xf0, 0x9a, 0x70, 0xcf, 0x30, 0xe6, 0x70, 0xf3, 0xf0, 0xf9, - 0xf0, 0xfc, 0xf0, 0xe6, 0x70, 0xcb, 0x30, 0xdb, 0x90, 0xf8, 0xc0, 0xf9, 0xe0, 0xfb, 0xf0, + 0xfb, 0xf0, 0x79, 0xf0, 0x38, 0xf0, 0x9a, 0x70, 0xcf, 0x30, + 0xe6, 0x70, 0xf3, 0xf0, 0xf9, 0xf0, 0xfc, 0xf0, 0xe6, 0x70, + 0xcb, 0x30, 0xdb, 0x90, 0xf8, 0xc0, 0xf9, 0xe0, 0xfb, 0xf0, }; const lv_img_dsc_t bt_no_signal = { @@ -89,19 +94,20 @@ const lv_img_dsc_t bt_no_signal = { #define LV_ATTRIBUTE_IMG_BT_UNBONDED #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BT_UNBONDED uint8_t - bt_unbonded_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST + LV_ATTRIBUTE_IMG_BT_UNBONDED uint8_t bt_unbonded_map[] = { #if CONFIG_NICE_VIEW_WIDGET_INVERTED - 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ -#else 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ +#else + 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ #endif - 0x00, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, 0x38, 0x00, 0x21, 0x2c, 0x10, 0x41, 0xa6, 0x08, - 0x48, 0xec, 0x48, 0x90, 0x78, 0x24, 0x92, 0x31, 0x24, 0x90, 0x78, 0x24, 0x48, 0xec, 0x48, - 0x41, 0xa6, 0x08, 0x21, 0x2c, 0x10, 0x00, 0x38, 0x00, 0x00, 0x30, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, 0x38, 0x00, 0x21, 0x2c, 0x10, + 0x41, 0xa6, 0x08, 0x48, 0xec, 0x48, 0x90, 0x78, 0x24, 0x92, 0x31, 0x24, + 0x90, 0x78, 0x24, 0x48, 0xec, 0x48, 0x41, 0xa6, 0x08, 0x21, 0x2c, 0x10, + 0x00, 0x38, 0x00, 0x00, 0x30, 0x00, 0x00, 0x20, 0x00, }; const lv_img_dsc_t bt_unbonded = { @@ -118,18 +124,19 @@ const lv_img_dsc_t bt_unbonded = { #define LV_ATTRIBUTE_IMG_USB #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_USB uint8_t usb_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_USB + uint8_t usb_map[] = { #if CONFIG_NICE_VIEW_WIDGET_INVERTED - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ #else - 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ #endif - 0xff, 0x9f, 0xf0, 0xfe, 0x0f, 0xf0, 0xfc, 0x9f, 0xf0, 0xf9, 0xff, - 0xb0, 0x1b, 0xff, 0x90, 0x00, 0x00, 0x00, 0x1f, 0x7f, 0x90, 0xff, - 0x3f, 0xb0, 0xff, 0x91, 0xf0, 0xff, 0xc1, 0xf0, 0xff, 0xf1, 0xf0, + 0xff, 0x9f, 0xf0, 0xfe, 0x0f, 0xf0, 0xfc, 0x9f, 0xf0, 0xf9, 0xff, + 0xb0, 0x1b, 0xff, 0x90, 0x00, 0x00, 0x00, 0x1f, 0x7f, 0x90, 0xff, + 0x3f, 0xb0, 0xff, 0x91, 0xf0, 0xff, 0xc1, 0xf0, 0xff, 0xf1, 0xf0, }; const lv_img_dsc_t usb = { @@ -146,19 +153,21 @@ const lv_img_dsc_t usb = { #define LV_ATTRIBUTE_IMG_GAUGE #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_GAUGE uint8_t gauge_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_GAUGE + uint8_t gauge_map[] = { #if CONFIG_NICE_VIEW_WIDGET_INVERTED - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ #else - 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ #endif - 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x01, 0x00, 0x03, - 0xc0, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x00, 0x10, 0x78, 0x03, 0xfc, 0x00, 0x01, - 0x80, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x00, 0x3f, 0x00, 0x8c, 0x00, 0x00, 0x0f, - 0x80, 0x10, 0x00, 0x00, 0x07, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, + 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, + 0x01, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x00, + 0x10, 0x78, 0x03, 0xfc, 0x00, 0x01, 0x80, 0x00, 0xfe, 0x00, + 0x02, 0x00, 0x00, 0x3f, 0x00, 0x8c, 0x00, 0x00, 0x0f, 0x80, + 0x10, 0x00, 0x00, 0x07, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, }; const lv_img_dsc_t gauge = { @@ -175,34 +184,41 @@ const lv_img_dsc_t gauge = { #define LV_ATTRIBUTE_IMG_GRID #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_GRID uint8_t grid_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_GRID + uint8_t grid_map[] = { #if CONFIG_NICE_VIEW_WIDGET_INVERTED - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ #else - 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ -#endif - - 0xaa, 0x95, 0x52, 0xaa, 0x55, 0x4a, 0xa9, 0x55, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xaa, 0x95, 0x52, 0xaa, 0x55, 0x4a, 0xa9, 0x55, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, - 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x95, 0x52, 0xaa, 0x55, 0x4a, 0xa9, 0x55, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, - 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, - 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, - 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0x95, 0x52, 0xaa, 0x55, 0x4a, 0xa9, 0x55, 0x20, + 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ +#endif + + 0xaa, 0x95, 0x52, 0xaa, 0x55, 0x4a, 0xa9, 0x55, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, + 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, + 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xaa, 0x95, 0x52, 0xaa, 0x55, 0x4a, 0xa9, 0x55, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, + 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, + 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x95, 0x52, 0xaa, 0x55, 0x4a, + 0xa9, 0x55, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, + 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x02, 0x00, 0x40, 0x08, + 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x95, 0x52, 0xaa, 0x55, 0x4a, 0xa9, 0x55, 0x20, }; const lv_img_dsc_t grid = { @@ -219,8 +235,8 @@ const lv_img_dsc_t grid = { #define LV_ATTRIBUTE_IMG_PROFILES #endif -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_PROFILES uint8_t - profiles_map[] = { +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_PROFILES + uint8_t profiles_map[] = { #if CONFIG_NICE_VIEW_WIDGET_INVERTED 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ @@ -240,4 +256,4 @@ const lv_img_dsc_t profiles = { .header.h = 3, .data_size = 20, .data = profiles_map, -}; \ No newline at end of file +}; diff --git a/boards/shields/nice_oled/assets/pixel_operator_mono_12.c b/boards/shields/nice_oled/assets/pixel_operator_mono_12.c index 3a5a59f..c6b0f0e 100644 --- a/boards/shields/nice_oled/assets/pixel_operator_mono_12.c +++ b/boards/shields/nice_oled/assets/pixel_operator_mono_12.c @@ -22,7 +22,7 @@ *----------------*/ /*Store the image of the glyphs*/ -static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap_12[] = { /* U+0020 " " */ 0x0, @@ -312,7 +312,7 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { * GLYPH DESCRIPTION *--------------------*/ -static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc_12[] = { {.bitmap_index = 0, .adv_w = 0, .box_w = 0, @@ -895,7 +895,7 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { *--------------------*/ /*Collect the unicode lists and glyph_id offsets*/ -static const lv_font_fmt_txt_cmap_t cmaps[] = { +static const lv_font_fmt_txt_cmap_t cmaps_12[] = { {.range_start = 32, .range_length = 95, .glyph_id_start = 1, @@ -914,13 +914,13 @@ static lv_font_fmt_txt_glyph_cache_t cache; #endif #if LVGL_VERSION_MAJOR >= 8 -static const lv_font_fmt_txt_dsc_t font_dsc = { +static const lv_font_fmt_txt_dsc_t font_dsc_12 = { #else -static lv_font_fmt_txt_dsc_t font_dsc = { +static lv_font_fmt_txt_dsc_t font_dsc_12 = { #endif - .glyph_bitmap = glyph_bitmap, - .glyph_dsc = glyph_dsc, - .cmaps = cmaps, + .glyph_bitmap = glyph_bitmap_12, + .glyph_dsc = glyph_dsc_12, + .cmaps = cmaps_12, .kern_dsc = NULL, .kern_scale = 0, .cmap_num = 1, @@ -955,7 +955,7 @@ lv_font_t pixel_operator_mono_12 = { .underline_position = -2, .underline_thickness = 1, #endif - .dsc = &font_dsc, /*The custom font data. Will be accessed by + .dsc = &font_dsc_12, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ #if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9 .fallback = NULL, diff --git a/boards/shields/nice_oled/custom_status_screen.c b/boards/shields/nice_oled/custom_status_screen.c index 804a450..d90e4f6 100644 --- a/boards/shields/nice_oled/custom_status_screen.c +++ b/boards/shields/nice_oled/custom_status_screen.c @@ -4,6 +4,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include "assets/pixel_operator_mono.c" +#include "assets/pixel_operator_mono_12.c" #include "assets/pixel_operator_mono_8.c" // auto save conflict #include "assets/custom_fonts.h" diff --git a/boards/shields/nice_oled/widgets/output.c b/boards/shields/nice_oled/widgets/output.c index fe79af5..75a4b06 100644 --- a/boards/shields/nice_oled/widgets/output.c +++ b/boards/shields/nice_oled/widgets/output.c @@ -44,16 +44,11 @@ static void draw_ble_connected(lv_obj_t *canvas) { void draw_output_status(lv_obj_t *canvas, const struct status_state *state) { /* - lv_draw_label_dsc_t label_dsc; - init_label_dsc(&label_dsc, LVGL_FOREGROUND, &pixel_operator_mono, - LV_TEXT_ALIGN_LEFT); - lv_canvas_draw_text(canvas, 0, 1, 25, &label_dsc, "SIG"); - */ - + * WHITOUT BACKGROUND lv_draw_rect_dsc_t rect_white_dsc; init_rect_dsc(&rect_white_dsc, LVGL_FOREGROUND); lv_canvas_draw_rect(canvas, -3, 32, 24, 15, &rect_white_dsc); - // lv_canvas_draw_rect(canvas, 43, 0, 24, 15, &rect_white_dsc); + */ #if !IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) switch (state->selected_endpoint.transport) { diff --git a/boards/shields/nice_oled/widgets/wpm.c b/boards/shields/nice_oled/widgets/wpm.c index b08c771..697e990 100644 --- a/boards/shields/nice_oled/widgets/wpm.c +++ b/boards/shields/nice_oled/widgets/wpm.c @@ -133,8 +133,10 @@ static void draw_graph(lv_obj_t *canvas, const struct status_state *state) { static void draw_label(lv_obj_t *canvas, const struct status_state *state) { lv_draw_label_dsc_t label_dsc_wpm; - init_label_dsc(&label_dsc_wpm, LVGL_FOREGROUND, &pixel_operator_mono, + init_label_dsc(&label_dsc_wpm, LVGL_FOREGROUND, &pixel_operator_mono_12, LV_TEXT_ALIGN_LEFT); + // init_label_dsc(&label_dsc_wpm, LVGL_FOREGROUND, &pixel_operator_mono, + // LV_TEXT_ALIGN_LEFT); char wpm_text[10] = {}; @@ -142,12 +144,17 @@ static void draw_label(lv_obj_t *canvas, const struct status_state *state) { // if wpm < 10, elsse if wpm => 10 and wpm < 100, else wpm >= 100 if (state->wpm[9] < 10) { lv_canvas_draw_text(canvas, 12, 75, 50, &label_dsc_wpm, wpm_text); + // lv_canvas_draw_text(canvas, 12, 75, 50, &label_dsc_wpm, wpm_text); // + // with global font } else if (state->wpm[9] >= 10 && state->wpm[9] < 100) { - lv_canvas_draw_text(canvas, 8, 75, 50, &label_dsc_wpm, wpm_text); + lv_canvas_draw_text(canvas, 9, 75, 50, &label_dsc_wpm, wpm_text); + // lv_canvas_draw_text(canvas, 8, 75, 50, &label_dsc_wpm, wpm_text); // with + // global font } else { - lv_canvas_draw_text(canvas, 5, 75, 50, &label_dsc_wpm, wpm_text); + lv_canvas_draw_text(canvas, 7, 75, 50, &label_dsc_wpm, wpm_text); + // lv_canvas_draw_text(canvas, 5, 75, 50, &label_dsc_wpm, wpm_text); // with + // global font } - // lv_canvas_draw_text(canvas, 0, 103, 50, &label_dsc_wpm, wpm_text); } static void draw_bongocat(lv_obj_t *canvas, const struct status_state *state) { diff --git a/build.yaml b/build.yaml deleted file mode 100644 index 83c7a16..0000000 --- a/build.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# This file generates the GitHub Actions matrix. -# For simple board + shield combinations, add them to the top level board and -# shield arrays, for more control, add individual board + shield combinations -# to the `include` property. You can also use the `cmake-args` property to -# pass flags to the build command and `artifact-name` to assign a name to -# distinguish build outputs from each other: -# -# board: [ "nice_nano_v2" ] -# shield: [ "corne_left", "corne_right" ] -# include: -# - board: bdn9_rev2 -# - board: nice_nano_v2 -# shield: reviung41 -# - board: nice_nano_v2 -# shield: corne_left -# cmake-args: -DCONFIG_ZMK_USB_LOGGING=y -# artifact-name: corne_left_with_logging -# ---- -include: - - board: nice_nano_v2 - shield: corne_left nice_oled - cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Corne_Oled\" - artifact-name: nice_corne_left_oled - snippet: studio-rpc-usb-uart - - board: nice_nano_v2 - shield: corne_right nice_oled - artifact-name: nice_corne_right_oled diff --git a/config/west.yml b/config/west.yml deleted file mode 100644 index ec9ba51..0000000 --- a/config/west.yml +++ /dev/null @@ -1,20 +0,0 @@ -manifest: - remotes: - - name: zmkfirmware - url-base: https://github.com/zmkfirmware - - name: mctechnology17 - url-base: https://github.com/mctechnology17 - projects: - - name: zmk - remote: zmkfirmware - revision: main - import: app/west.yml - # include corne with dongle pro_micro and xiao compatible - - name: zmk-config - remote: mctechnology17 - revision: main - # - name: zmk-nice-oled - # remote: mctechnology17 - # revision: main - self: - path: config diff --git a/zephyr/module.yml b/zephyr/module.yml index 1cc2b35..4a6c26c 100644 --- a/zephyr/module.yml +++ b/zephyr/module.yml @@ -1,3 +1,4 @@ +name: "nice!oled" build: settings: board_root: .