Skip to content

Commit

Permalink
Output background removed, now the screen is cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
mctechnology17 committed Dec 5, 2024
1 parent f67688f commit 8125393
Show file tree
Hide file tree
Showing 16 changed files with 122 additions and 147 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
---
Expand Down Expand Up @@ -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)
Binary file modified assets/animation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/animation2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/banner.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/banner2.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/star.GIF
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added boards/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion boards/shields/nice_oled/assets/custom_fonts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
164 changes: 90 additions & 74 deletions boards/shields/nice_oled/assets/images.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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*/
Expand All @@ -240,4 +256,4 @@ const lv_img_dsc_t profiles = {
.header.h = 3,
.data_size = 20,
.data = profiles_map,
};
};
18 changes: 9 additions & 9 deletions boards/shields/nice_oled/assets/pixel_operator_mono_12.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions boards/shields/nice_oled/custom_status_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 2 additions & 7 deletions boards/shields/nice_oled/widgets/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit 8125393

Please sign in to comment.