-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor and prep for animation
- Loading branch information
1 parent
8cc7be2
commit c9c56a8
Showing
28 changed files
with
376 additions
and
142 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,39 @@ | ||
if(CONFIG_ZMK_DISPLAY AND CONFIG_NICE_VIEW_WIDGET_STATUS) | ||
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) | ||
|
||
zephyr_library_sources(./src/main.c) | ||
zephyr_library_sources( | ||
./src/main.c | ||
./src/fonts/custom_font_22.c | ||
./src/fonts/custom_font_44.c | ||
./src/images/background_0.c | ||
./src/images/background_1.c | ||
./src/images/background_2.c | ||
./src/images/background_3.c | ||
./src/images/background_4.c | ||
./src/images/background_5.c | ||
./src/images/background_6.c | ||
./src/images/bluetooth_logo_outline.c | ||
./src/images/bluetooth_logo_outlined.c | ||
./src/images/bluetooth_logo.c | ||
./src/images/usb_logo.c | ||
./src/utils/draw_background.c | ||
./src/utils/draw_battery.c | ||
./src/utils/draw_bluetooth_logo_outline.c | ||
./src/utils/draw_bluetooth_logo_outlined.c | ||
./src/utils/draw_bluetooth_logo.c | ||
./src/utils/draw_usb_logo.c | ||
./src/utils/rotate_info_canvas.c | ||
) | ||
|
||
if(NOT CONFIG_ZMK_SPLIT OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) | ||
zephyr_library_sources(./src/initialize_central_listeners.c) | ||
zephyr_library_sources(./src/render_central.c) | ||
zephyr_library_sources( | ||
./src/central/initialize_listeners.c | ||
./src/central/render_central.c | ||
) | ||
else() | ||
zephyr_library_sources(./src/initialize_peripheral_listeners.c) | ||
zephyr_library_sources(./src/render_peripheral.c) | ||
zephyr_library_sources( | ||
./src/peripheral/initialize_listeners.c | ||
./src/peripheral/render_peripheral.c | ||
) | ||
endif() | ||
|
||
zephyr_library_sources(./src/fonts/custom_font_22.c) | ||
zephyr_library_sources(./src/fonts/custom_font_44.c) | ||
|
||
zephyr_library_sources(./src/images/background_0.c) | ||
zephyr_library_sources(./src/images/background_1.c) | ||
zephyr_library_sources(./src/images/background_2.c) | ||
zephyr_library_sources(./src/images/background_3.c) | ||
zephyr_library_sources(./src/images/background_4.c) | ||
|
||
zephyr_library_sources(./src/images/bluetooth_logo_outline.c) | ||
zephyr_library_sources(./src/images/bluetooth_logo_outlined.c) | ||
zephyr_library_sources(./src/images/bluetooth_logo.c) | ||
zephyr_library_sources(./src/images/usb_logo.c) | ||
|
||
zephyr_library_sources(./src/utils/draw_background.c) | ||
zephyr_library_sources(./src/utils/draw_battery.c) | ||
zephyr_library_sources(./src/utils/draw_bluetooth_logo_outline.c) | ||
zephyr_library_sources(./src/utils/draw_bluetooth_logo_outlined.c) | ||
zephyr_library_sources(./src/utils/draw_bluetooth_logo.c) | ||
zephyr_library_sources(./src/utils/draw_usb_logo.c) | ||
zephyr_library_sources(./src/utils/rotate_info_canvas.c) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
# Enable nice!view | ||
# ZMK setting that enables the call to `lv_obj_t* zmk_display_status_screen()`. | ||
CONFIG_ZMK_DISPLAY=y | ||
# Disable idle blanking | ||
CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE=n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
config/boards/shields/custom_nice_view/include/images/background_5.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
|
||
#include <lvgl.h> | ||
|
||
extern const lv_img_dsc_t background_5; |
5 changes: 5 additions & 0 deletions
5
config/boards/shields/custom_nice_view/include/images/background_6.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
|
||
#include <lvgl.h> | ||
|
||
extern const lv_img_dsc_t background_6; |
26 changes: 0 additions & 26 deletions
26
config/boards/shields/custom_nice_view/include/initialize_peripheral_listeners.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#pragma once | ||
|
||
#include <zmk/display/status_screen.h> | ||
|
||
#include <lvgl.h> | ||
|
||
#define SCREEN_WIDTH 160 | ||
|
20 changes: 20 additions & 0 deletions
20
config/boards/shields/custom_nice_view/include/peripheral/initialize_listeners.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
#include "../initialize_listeners.h" | ||
|
||
#include <stdbool.h> | ||
#include "../utils/draw_battery.h" | ||
|
||
struct peripheral_connectivity_state { | ||
bool connected; | ||
}; | ||
|
||
struct states { | ||
struct peripheral_connectivity_state connectivity; | ||
struct battery_state battery; | ||
unsigned background_index; | ||
}; | ||
|
||
extern struct states states; | ||
|
||
void initialize_listeners(); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
config/boards/shields/custom_nice_view/src/images/background_4.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.