diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/app_console/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | src/audio/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | src/battery/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | src/database/CMakeLists.txt | 22 | ||||
| -rw-r--r-- | src/dev_console/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | src/drivers/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/drivers/bluetooth.cpp | 1 | ||||
| -rw-r--r-- | src/drivers/include/nvs.hpp | 1 | ||||
| -rw-r--r-- | src/drivers/nvs.cpp | 3 | ||||
| -rw-r--r-- | src/events/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | src/input/CMakeLists.txt | 13 | ||||
| -rw-r--r-- | src/lua/CMakeLists.txt | 13 | ||||
| -rw-r--r-- | src/main/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/system_fsm/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | src/tangara/CMakeLists.txt | 23 | ||||
| -rw-r--r-- | src/tangara/app_console/app_console.cpp (renamed from src/app_console/app_console.cpp) | 32 | ||||
| -rw-r--r-- | src/tangara/app_console/app_console.hpp (renamed from src/app_console/include/app_console.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/README.md (renamed from src/audio/README.md) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/audio_converter.cpp (renamed from src/audio/audio_converter.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/audio_converter.hpp (renamed from src/audio/include/audio_converter.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/audio_decoder.cpp (renamed from src/audio/audio_decoder.cpp) | 7 | ||||
| -rw-r--r-- | src/tangara/audio/audio_decoder.hpp (renamed from src/audio/include/audio_decoder.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/audio_events.hpp (renamed from src/audio/include/audio_events.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/audio_fsm.cpp (renamed from src/audio/audio_fsm.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/audio_fsm.hpp (renamed from src/audio/include/audio_fsm.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/audio_sink.hpp (renamed from src/audio/include/audio_sink.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/audio_source.cpp (renamed from src/audio/audio_source.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/audio_source.hpp (renamed from src/audio/include/audio_source.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/bt_audio_output.cpp (renamed from src/audio/bt_audio_output.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/bt_audio_output.hpp (renamed from src/audio/include/bt_audio_output.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/fatfs_audio_input.cpp (renamed from src/audio/fatfs_audio_input.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/fatfs_audio_input.hpp (renamed from src/audio/include/fatfs_audio_input.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/fatfs_source.cpp (renamed from src/audio/fatfs_source.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/fatfs_source.hpp (renamed from src/audio/include/fatfs_source.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/i2s_audio_output.cpp (renamed from src/audio/i2s_audio_output.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/i2s_audio_output.hpp (renamed from src/audio/include/i2s_audio_output.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/readahead_source.cpp (renamed from src/audio/readahead_source.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/readahead_source.hpp (renamed from src/audio/include/readahead_source.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/resample.cpp (renamed from src/audio/resample.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/resample.hpp (renamed from src/audio/include/resample.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/test/CMakeLists.txt (renamed from src/audio/test/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/track_queue.cpp (renamed from src/audio/track_queue.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/audio/track_queue.hpp (renamed from src/audio/include/track_queue.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/battery/battery.cpp (renamed from src/battery/battery.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/battery/battery.hpp (renamed from src/battery/include/battery.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/database.cpp (renamed from src/database/database.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/database.hpp (renamed from src/database/include/database.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/db_events.hpp (renamed from src/database/include/db_events.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/env_esp.cpp (renamed from src/database/env_esp.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/env_esp.hpp (renamed from src/database/include/env_esp.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/file_gatherer.cpp (renamed from src/database/file_gatherer.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/file_gatherer.hpp (renamed from src/database/include/file_gatherer.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/future_fetcher.hpp (renamed from src/database/include/future_fetcher.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/index.cpp (renamed from src/database/index.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/index.hpp (renamed from src/database/include/index.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/records.cpp (renamed from src/database/records.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/records.hpp (renamed from src/database/include/records.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/tag_parser.cpp (renamed from src/database/tag_parser.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/tag_parser.hpp (renamed from src/database/include/tag_parser.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/test/CMakeLists.txt (renamed from src/database/test/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/tangara/database/test/test_database.cpp (renamed from src/database/test/test_database.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/test/test_records.cpp (renamed from src/database/test/test_records.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/track.cpp (renamed from src/database/track.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/database/track.hpp (renamed from src/database/include/track.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/dev_console/console.cpp (renamed from src/dev_console/console.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/dev_console/console.hpp (renamed from src/dev_console/include/console.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/events/event_queue.cpp (renamed from src/events/event_queue.cpp) | 2 | ||||
| -rw-r--r-- | src/tangara/events/event_queue.hpp (renamed from src/events/include/event_queue.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/device_factory.cpp (renamed from src/input/device_factory.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/device_factory.hpp (renamed from src/input/include/device_factory.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/feedback_device.hpp (renamed from src/input/include/feedback_device.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/feedback_haptics.cpp (renamed from src/input/feedback_haptics.cpp) | 2 | ||||
| -rw-r--r-- | src/tangara/input/feedback_haptics.hpp (renamed from src/input/include/feedback_haptics.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/input_device.hpp (renamed from src/input/include/input_device.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/input_hook.cpp (renamed from src/input/input_hook.cpp) | 8 | ||||
| -rw-r--r-- | src/tangara/input/input_hook.hpp (renamed from src/input/include/input_hook.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/input_hook_actions.cpp (renamed from src/input/input_hook_actions.cpp) | 6 | ||||
| -rw-r--r-- | src/tangara/input/input_hook_actions.hpp (renamed from src/input/include/input_hook_actions.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/input_nav_buttons.cpp (renamed from src/input/input_nav_buttons.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/input_nav_buttons.hpp (renamed from src/input/include/input_nav_buttons.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/input_touch_dpad.cpp (renamed from src/input/input_touch_dpad.cpp) | 11 | ||||
| -rw-r--r-- | src/tangara/input/input_touch_dpad.hpp (renamed from src/input/include/input_touch_dpad.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/input_touch_wheel.cpp (renamed from src/input/input_touch_wheel.cpp) | 4 | ||||
| -rw-r--r-- | src/tangara/input/input_touch_wheel.hpp (renamed from src/input/include/input_touch_wheel.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/input_trigger.cpp (renamed from src/input/input_trigger.cpp) | 4 | ||||
| -rw-r--r-- | src/tangara/input/input_trigger.hpp (renamed from src/input/include/input_trigger.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/input_volume_buttons.cpp (renamed from src/input/input_volume_buttons.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/input_volume_buttons.hpp (renamed from src/input/include/input_volume_buttons.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/input/lvgl_input_driver.cpp (renamed from src/input/lvgl_input_driver.cpp) | 24 | ||||
| -rw-r--r-- | src/tangara/input/lvgl_input_driver.hpp (renamed from src/input/include/lvgl_input_driver.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/bridge.cpp (renamed from src/lua/bridge.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/bridge.hpp (renamed from src/lua/include/bridge.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_controls.cpp (renamed from src/lua/lua_controls.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_controls.hpp (renamed from src/lua/include/lua_controls.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_database.cpp (renamed from src/lua/lua_database.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_database.hpp (renamed from src/lua/include/lua_database.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_queue.cpp (renamed from src/lua/lua_queue.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_queue.hpp (renamed from src/lua/include/lua_queue.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_registry.hpp (renamed from src/lua/include/lua_registry.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_screen.cpp (renamed from src/lua/lua_screen.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_screen.hpp (renamed from src/lua/include/lua_screen.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_theme.cpp (renamed from src/lua/lua_theme.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_theme.hpp (renamed from src/lua/include/lua_theme.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_thread.cpp (renamed from src/lua/lua_thread.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_thread.hpp (renamed from src/lua/include/lua_thread.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_version.cpp (renamed from src/lua/lua_version.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/lua_version.hpp (renamed from src/lua/include/lua_version.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/property.cpp (renamed from src/lua/property.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/property.hpp (renamed from src/lua/include/property.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/lua/registry.cpp (renamed from src/lua/registry.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/system_fsm/booting.cpp (renamed from src/system_fsm/booting.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/system_fsm/idle.cpp (renamed from src/system_fsm/idle.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/system_fsm/running.cpp (renamed from src/system_fsm/running.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/system_fsm/service_locator.cpp (renamed from src/system_fsm/service_locator.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/system_fsm/service_locator.hpp (renamed from src/system_fsm/include/service_locator.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/system_fsm/system_events.hpp (renamed from src/system_fsm/include/system_events.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/system_fsm/system_fsm.cpp (renamed from src/system_fsm/system_fsm.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/system_fsm/system_fsm.hpp (renamed from src/system_fsm/include/system_fsm.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/font_fusion_10.c (renamed from src/ui/font_fusion_10.c) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/font_fusion_12.c (renamed from src/ui/font_fusion_12.c) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/font_symbols.c (renamed from src/ui/font_symbols.c) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/fonts.hpp (renamed from src/ui/include/fonts.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/lvgl_task.cpp (renamed from src/ui/lvgl_task.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/lvgl_task.hpp (renamed from src/ui/include/lvgl_task.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/modal.cpp (renamed from src/ui/modal.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/modal.hpp (renamed from src/ui/include/modal.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/screen.cpp (renamed from src/ui/screen.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/screen.hpp (renamed from src/ui/include/screen.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/screen_lua.cpp (renamed from src/ui/screen_lua.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/screen_lua.hpp (renamed from src/ui/include/screen_lua.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/screen_splash.cpp (renamed from src/ui/screen_splash.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/screen_splash.hpp (renamed from src/ui/include/screen_splash.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/splash.c (renamed from src/ui/splash.c) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/themes.cpp (renamed from src/ui/themes.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/themes.hpp (renamed from src/ui/include/themes.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/ui_events.hpp (renamed from src/ui/include/ui_events.hpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/ui_fsm.cpp (renamed from src/ui/ui_fsm.cpp) | 0 | ||||
| -rw-r--r-- | src/tangara/ui/ui_fsm.hpp (renamed from src/ui/include/ui_fsm.hpp) | 0 | ||||
| -rw-r--r-- | src/ui/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | src/ui/icons/battery_20.c | 52 | ||||
| -rw-r--r-- | src/ui/icons/battery_40.c | 52 | ||||
| -rw-r--r-- | src/ui/icons/battery_60.c | 52 | ||||
| -rw-r--r-- | src/ui/icons/battery_80.c | 52 | ||||
| -rw-r--r-- | src/ui/icons/battery_empty.c | 52 | ||||
| -rw-r--r-- | src/ui/icons/battery_full.c | 52 | ||||
| -rw-r--r-- | src/ui/icons/bluetooth.c | 54 | ||||
| -rw-r--r-- | src/ui/icons/pause.c | 54 | ||||
| -rw-r--r-- | src/ui/icons/play.c | 54 | ||||
| -rw-r--r-- | src/ui/include/ui_tick.hpp | 11 | ||||
| -rw-r--r-- | src/util/CMakeLists.txt | 2 |
150 files changed, 77 insertions, 668 deletions
diff --git a/src/app_console/CMakeLists.txt b/src/app_console/CMakeLists.txt deleted file mode 100644 index 1a2ae8d6..00000000 --- a/src/app_console/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2023 jacqueline <me@jacqueline.id.au> -# -# SPDX-License-Identifier: GPL-3.0-only - -idf_component_register( - SRCS "app_console.cpp" - INCLUDE_DIRS "include" - REQUIRES "dev_console" "events" "database") -target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/audio/CMakeLists.txt b/src/audio/CMakeLists.txt deleted file mode 100644 index 635320f4..00000000 --- a/src/audio/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2023 jacqueline <me@jacqueline.id.au> -# -# SPDX-License-Identifier: GPL-3.0-only - -idf_component_register( - SRCS "audio_decoder.cpp" "fatfs_audio_input.cpp" "i2s_audio_output.cpp" - "track_queue.cpp" "audio_fsm.cpp" "audio_converter.cpp" "resample.cpp" - "fatfs_source.cpp" "bt_audio_output.cpp" "readahead_source.cpp" - "audio_source.cpp" - INCLUDE_DIRS "include" - REQUIRES "codecs" "drivers" "cbor" "result" "tasks" "memory" "tinyfsm" - "database" "system_fsm" "speexdsp" "millershuffle" "libcppbor") - -target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/battery/CMakeLists.txt b/src/battery/CMakeLists.txt deleted file mode 100644 index 313a3731..00000000 --- a/src/battery/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 2023 jacqueline <me@jacqueline.id.au> -# -# SPDX-License-Identifier: GPL-3.0-only - -idf_component_register( - SRCS "battery.cpp" - INCLUDE_DIRS "include" - REQUIRES "drivers" "events") - -target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/database/CMakeLists.txt b/src/database/CMakeLists.txt deleted file mode 100644 index 248ca3d7..00000000 --- a/src/database/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2023 jacqueline <me@jacqueline.id.au> -# -# SPDX-License-Identifier: GPL-3.0-only - -idf_component_register( - SRCS "env_esp.cpp" "database.cpp" "track.cpp" "records.cpp" - "file_gatherer.cpp" "tag_parser.cpp" "index.cpp" - INCLUDE_DIRS "include" - REQUIRES "result" "esp_psram" "fatfs" "libtags" "komihash" "cbor" - "tasks" "memory" "util" "tinyfsm" "events" "opusfile" "libcppbor") - -target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) - -set(LEVELDB_BUILD_TESTS OFF) -set(LEVELDB_BUILD_BENCHMARKS OFF) -set(LEVELDB_INSTALL OFF) - -set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) - -add_subdirectory($ENV{PROJ_PATH}/lib/leveldb ${CMAKE_CURRENT_BINARY_DIR}/leveldb) - -target_link_libraries(${COMPONENT_LIB} PUBLIC leveldb) diff --git a/src/dev_console/CMakeLists.txt b/src/dev_console/CMakeLists.txt deleted file mode 100644 index 5555bf61..00000000 --- a/src/dev_console/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2023 jacqueline <me@jacqueline.id.au> -# -# SPDX-License-Identifier: GPL-3.0-only - -idf_component_register( - SRCS "console.cpp" - INCLUDE_DIRS "include" - REQUIRES "console" "memory") -target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/drivers/CMakeLists.txt b/src/drivers/CMakeLists.txt index c2018d3f..91534edb 100644 --- a/src/drivers/CMakeLists.txt +++ b/src/drivers/CMakeLists.txt @@ -7,6 +7,6 @@ idf_component_register( "i2c.cpp" "bluetooth.cpp" "spi.cpp" "display.cpp" "display_init.cpp" "samd.cpp" "wm8523.cpp" "nvs.cpp" "haptics.cpp" "spiffs.cpp" INCLUDE_DIRS "include" - REQUIRES "esp_adc" "fatfs" "result" "lvgl" "tasks" "nvs_flash" "spiffs" - "bt" "tinyfsm" "util") + REQUIRES "esp_adc" "fatfs" "result" "lvgl" "nvs_flash" "spiffs" "bt" + "tasks" "tinyfsm" "util" "libcppbor") target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/drivers/bluetooth.cpp b/src/drivers/bluetooth.cpp index 5d1b35fa..40be530e 100644 --- a/src/drivers/bluetooth.cpp +++ b/src/drivers/bluetooth.cpp @@ -25,7 +25,6 @@ #include "freertos/portmacro.h" #include "freertos/projdefs.h" #include "freertos/timers.h" -#include "sample.hpp" #include "tinyfsm/include/tinyfsm.hpp" #include "bluetooth_types.hpp" diff --git a/src/drivers/include/nvs.hpp b/src/drivers/include/nvs.hpp index 7c74ceb0..ac1a1096 100644 --- a/src/drivers/include/nvs.hpp +++ b/src/drivers/include/nvs.hpp @@ -15,7 +15,6 @@ #include "bluetooth_types.hpp" #include "lru_cache.hpp" -#include "tasks.hpp" namespace drivers { diff --git a/src/drivers/nvs.cpp b/src/drivers/nvs.cpp index c8befe48..0aaf79f0 100644 --- a/src/drivers/nvs.cpp +++ b/src/drivers/nvs.cpp @@ -5,8 +5,6 @@ */ #include "nvs.hpp" -#include <stdint.h> -#include <sys/_stdint.h> #include <cstdint> #include <memory> @@ -18,7 +16,6 @@ #include "esp_log.h" #include "nvs.h" #include "nvs_flash.h" -#include "tasks.hpp" #include "wm8523.hpp" namespace drivers { diff --git a/src/events/CMakeLists.txt b/src/events/CMakeLists.txt deleted file mode 100644 index 132c39c7..00000000 --- a/src/events/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2023 jacqueline <me@jacqueline.id.au> -# -# SPDX-License-Identifier: GPL-3.0-only - -idf_component_register( - SRCS "event_queue.cpp" - INCLUDE_DIRS "include" - REQUIRES "tinyfsm" "ui") -target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/input/CMakeLists.txt b/src/input/CMakeLists.txt deleted file mode 100644 index 4754ba47..00000000 --- a/src/input/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2023 jacqueline <me@jacqueline.id.au> -# -# SPDX-License-Identifier: GPL-3.0-only - -idf_component_register( - SRCS "input_touch_wheel.cpp" "input_touch_dpad.cpp" "input_trigger.cpp" - "input_volume_buttons.cpp" "lvgl_input_driver.cpp" "feedback_haptics.cpp" - "device_factory.cpp" "input_nav_buttons.cpp" "input_hook.cpp" - "input_hook_actions.cpp" - INCLUDE_DIRS "include" - REQUIRES "drivers" "lvgl" "events" "system_fsm") - -target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/lua/CMakeLists.txt b/src/lua/CMakeLists.txt deleted file mode 100644 index 0240a50c..00000000 --- a/src/lua/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2023 jacqueline <me@jacqueline.id.au> -# -# SPDX-License-Identifier: GPL-3.0-only - -idf_component_register( - SRCS "lua_theme.cpp" "lua_thread.cpp" "bridge.cpp" "property.cpp" "lua_database.cpp" - "lua_queue.cpp" "lua_version.cpp" "lua_theme.cpp" "lua_controls.cpp" "registry.cpp" - "lua_screen.cpp" - INCLUDE_DIRS "include" - REQUIRES "drivers" "lvgl" "tinyfsm" "events" "system_fsm" "database" - "esp_timer" "battery" "esp-idf-lua" "luavgl" "lua-linenoise" "lua-term" - "esp_app_format") -target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt index 3ae92ac2..9019c254 100644 --- a/src/main/CMakeLists.txt +++ b/src/main/CMakeLists.txt @@ -2,8 +2,5 @@ # # SPDX-License-Identifier: GPL-3.0-only -idf_component_register( - SRCS "main.cpp" - INCLUDE_DIRS "." - REQUIRES "audio" "ui" "system_fsm" "events") +idf_component_register(SRCS "main.cpp" INCLUDE_DIRS "." REQUIRES "tangara") target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/system_fsm/CMakeLists.txt b/src/system_fsm/CMakeLists.txt deleted file mode 100644 index e98d4653..00000000 --- a/src/system_fsm/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2023 jacqueline <me@jacqueline.id.au> -# -# SPDX-License-Identifier: GPL-3.0-only - -idf_component_register( - SRCS "system_fsm.cpp" "running.cpp" "booting.cpp" "idle.cpp" - "service_locator.cpp" - INCLUDE_DIRS "include" - REQUIRES "tinyfsm" "drivers" "database" "ui" "result" "events" "audio" - "app_console" "battery" "locale") -target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/tangara/CMakeLists.txt b/src/tangara/CMakeLists.txt new file mode 100644 index 00000000..6bd648eb --- /dev/null +++ b/src/tangara/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright 2024 jacqueline <me@jacqueline.id.au> +# +# SPDX-License-Identifier: GPL-3.0-only + +idf_component_register( + SRC_DIRS "app_console" "audio" "battery" "database" "dev_console" "events" + "input" "lua" "system_fsm" "ui" + INCLUDE_DIRS "." "app_console" "audio" "battery" "database" "dev_console" + "events" "input" "lua" "system_fsm" "ui" + REQUIRES "codecs" "drivers" "locale" "memory" "tasks" "util" + "tinyfsm" "lvgl" "esp_timer" "luavgl" "esp_app_format" "libcppbor" "libtags" + "komihash" "result" "esp_psram" "fatfs" "millershuffle" "speexdsp" "console" + "esp-idf-lua" "lua-linenoise" "lua-term") +target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) + +set(LEVELDB_BUILD_TESTS OFF) +set(LEVELDB_BUILD_BENCHMARKS OFF) +set(LEVELDB_INSTALL OFF) + +set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) + +add_subdirectory($ENV{PROJ_PATH}/lib/leveldb ${CMAKE_CURRENT_BINARY_DIR}/leveldb) +target_link_libraries(${COMPONENT_LIB} PUBLIC leveldb) diff --git a/src/app_console/app_console.cpp b/src/tangara/app_console/app_console.cpp index 7c7c1abc..09f267d8 100644 --- a/src/app_console/app_console.cpp +++ b/src/tangara/app_console/app_console.cpp @@ -4,11 +4,9 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "app_console.hpp" +#include "app_console/app_console.hpp" #include <dirent.h> -#include <stdint.h> -#include <sys/_stdint.h> #include <algorithm> #include <cstdint> @@ -21,11 +19,7 @@ #include <string> #include "FreeRTOSConfig.h" -#include "audio_events.hpp" -#include "audio_fsm.hpp" -#include "bluetooth.hpp" -#include "bluetooth_types.hpp" -#include "database.hpp" + #include "esp_app_desc.h" #include "esp_console.h" #include "esp_err.h" @@ -34,19 +28,25 @@ #include "esp_intr_alloc.h" #include "esp_log.h" #include "esp_system.h" -#include "event_queue.hpp" #include "ff.h" -#include "freertos/FreeRTOSConfig_arch.h" #include "freertos/projdefs.h" + +#include "bluetooth.hpp" +#include "bluetooth_types.hpp" #include "haptics.hpp" -#include "index.hpp" -#include "lua_registry.hpp" #include "memory_resource.hpp" #include "samd.hpp" -#include "service_locator.hpp" -#include "system_events.hpp" -#include "track.hpp" -#include "ui_events.hpp" + +#include "audio/audio_events.hpp" +#include "audio/audio_fsm.hpp" +#include "database/database.hpp" +#include "database/index.hpp" +#include "database/track.hpp" +#include "events/event_queue.hpp" +#include "lua/lua_registry.hpp" +#include "system_fsm/service_locator.hpp" +#include "system_fsm/system_events.hpp" +#include "ui/ui_events.hpp" namespace console { diff --git a/src/app_console/include/app_console.hpp b/src/tangara/app_console/app_console.hpp index 5981cc04..5981cc04 100644 --- a/src/app_console/include/app_console.hpp +++ b/src/tangara/app_console/app_console.hpp diff --git a/src/audio/README.md b/src/tangara/audio/README.md index 218be2c4..218be2c4 100644 --- a/src/audio/README.md +++ b/src/tangara/audio/README.md diff --git a/src/audio/audio_converter.cpp b/src/tangara/audio/audio_converter.cpp index d2edb0b3..d2edb0b3 100644 --- a/src/audio/audio_converter.cpp +++ b/src/tangara/audio/audio_converter.cpp diff --git a/src/audio/include/audio_converter.hpp b/src/tangara/audio/audio_converter.hpp index 163c6836..163c6836 100644 --- a/src/audio/include/audio_converter.hpp +++ b/src/tangara/audio/audio_converter.hpp diff --git a/src/audio/audio_decoder.cpp b/src/tangara/audio/audio_decoder.cpp index baf17e7a..bf2d3fbe 100644 --- a/src/audio/audio_decoder.cpp +++ b/src/tangara/audio/audio_decoder.cpp @@ -6,20 +6,17 @@ #include "audio_decoder.hpp" -#include <cstdint> -#include <cstdlib> - #include <algorithm> #include <cmath> #include <cstddef> #include <cstdint> +#include <cstdlib> #include <cstring> #include <deque> #include <memory> #include <span> #include <variant> -#include "cbor.h" #include "esp_err.h" #include "esp_heap_caps.h" #include "esp_log.h" @@ -27,7 +24,6 @@ #include "freertos/projdefs.h" #include "freertos/queue.h" #include "freertos/ringbuf.h" -#include "i2s_dac.hpp" #include "audio_converter.hpp" #include "audio_events.hpp" @@ -37,6 +33,7 @@ #include "codec.hpp" #include "event_queue.hpp" #include "fatfs_audio_input.hpp" +#include "i2s_dac.hpp" #include "sample.hpp" #include "tasks.hpp" #include "track.hpp" diff --git a/src/audio/include/audio_decoder.hpp b/src/tangara/audio/audio_decoder.hpp index 8e955f74..8e955f74 100644 --- a/src/audio/include/audio_decoder.hpp +++ b/src/tangara/audio/audio_decoder.hpp diff --git a/src/audio/include/audio_events.hpp b/src/tangara/audio/audio_events.hpp index b8a0dba6..b8a0dba6 100644 --- a/src/audio/include/audio_events.hpp +++ b/src/tangara/audio/audio_events.hpp diff --git a/src/audio/audio_fsm.cpp b/src/tangara/audio/audio_fsm.cpp index ffb462f8..ffb462f8 100644 --- a/src/audio/audio_fsm.cpp +++ b/src/tangara/audio/audio_fsm.cpp diff --git a/src/audio/include/audio_fsm.hpp b/src/tangara/audio/audio_fsm.hpp index 60afb321..60afb321 100644 --- a/src/audio/include/audio_fsm.hpp +++ b/src/tangara/audio/audio_fsm.hpp diff --git a/src/audio/include/audio_sink.hpp b/src/tangara/audio/audio_sink.hpp index f31d0d75..f31d0d75 100644 --- a/src/audio/include/audio_sink.hpp +++ b/src/tangara/audio/audio_sink.hpp diff --git a/src/audio/audio_source.cpp b/src/tangara/audio/audio_source.cpp index ee2f617f..ee2f617f 100644 --- a/src/audio/audio_source.cpp +++ b/src/tangara/audio/audio_source.cpp diff --git a/src/audio/include/audio_source.hpp b/src/tangara/audio/audio_source.hpp index f6a34300..f6a34300 100644 --- a/src/audio/include/audio_source.hpp +++ b/src/tangara/audio/audio_source.hpp diff --git a/src/audio/bt_audio_output.cpp b/src/tangara/audio/bt_audio_output.cpp index 229a38bb..229a38bb 100644 --- a/src/audio/bt_audio_output.cpp +++ b/src/tangara/audio/bt_audio_output.cpp diff --git a/src/audio/include/bt_audio_output.hpp b/src/tangara/audio/bt_audio_output.hpp index cc3b2462..cc3b2462 100644 --- a/src/audio/include/bt_audio_output.hpp +++ b/src/tangara/audio/bt_audio_output.hpp diff --git a/src/audio/fatfs_audio_input.cpp b/src/tangara/audio/fatfs_audio_input.cpp index e5fb3b21..e5fb3b21 100644 --- a/src/audio/fatfs_audio_input.cpp +++ b/src/tangara/audio/fatfs_audio_input.cpp diff --git a/src/audio/include/fatfs_audio_input.hpp b/src/tangara/audio/fatfs_audio_input.hpp index 10b7433e..10b7433e 100644 --- a/src/audio/include/fatfs_audio_input.hpp +++ b/src/tangara/audio/fatfs_audio_input.hpp diff --git a/src/audio/fatfs_source.cpp b/src/tangara/audio/fatfs_source.cpp index dccdd581..dccdd581 100644 --- a/src/audio/fatfs_source.cpp +++ b/src/tangara/audio/fatfs_source.cpp diff --git a/src/audio/include/fatfs_source.hpp b/src/tangara/audio/fatfs_source.hpp index ce9b4db8..ce9b4db8 100644 --- a/src/audio/include/fatfs_source.hpp +++ b/src/tangara/audio/fatfs_source.hpp diff --git a/src/audio/i2s_audio_output.cpp b/src/tangara/audio/i2s_audio_output.cpp index bf1c3e5e..bf1c3e5e 100644 --- a/src/audio/i2s_audio_output.cpp +++ b/src/tangara/audio/i2s_audio_output.cpp diff --git a/src/audio/include/i2s_audio_output.hpp b/src/tangara/audio/i2s_audio_output.hpp index 7954257a..7954257a 100644 --- a/src/audio/include/i2s_audio_output.hpp +++ b/src/tangara/audio/i2s_audio_output.hpp diff --git a/src/audio/readahead_source.cpp b/src/tangara/audio/readahead_source.cpp index 6276907a..6276907a 100644 --- a/src/audio/readahead_source.cpp +++ b/src/tangara/audio/readahead_source.cpp diff --git a/src/audio/include/readahead_source.hpp b/src/tangara/audio/readahead_source.hpp index 74a30e1b..74a30e1b 100644 --- a/src/audio/include/readahead_source.hpp +++ b/src/tangara/audio/readahead_source.hpp diff --git a/src/audio/resample.cpp b/src/tangara/audio/resample.cpp index 1e20392b..1e20392b 100644 --- a/src/audio/resample.cpp +++ b/src/tangara/audio/resample.cpp diff --git a/src/audio/include/resample.hpp b/src/tangara/audio/resample.hpp index 4d48d47f..4d48d47f 100644 --- a/src/audio/include/resample.hpp +++ b/src/tangara/audio/resample.hpp diff --git a/src/audio/test/CMakeLists.txt b/src/tangara/audio/test/CMakeLists.txt index 4d580b1c..4d580b1c 100644 --- a/src/audio/test/CMakeLists.txt +++ b/src/tangara/audio/test/CMakeLists.txt diff --git a/src/audio/track_queue.cpp b/src/tangara/audio/track_queue.cpp index dbe283c4..dbe283c4 100644 --- a/src/audio/track_queue.cpp +++ b/src/tangara/audio/track_queue.cpp diff --git a/src/audio/include/track_queue.hpp b/src/tangara/audio/track_queue.hpp index 5b7c9448..5b7c9448 100644 --- a/src/audio/include/track_queue.hpp +++ b/src/tangara/audio/track_queue.hpp diff --git a/src/battery/battery.cpp b/src/tangara/battery/battery.cpp index debef9e6..debef9e6 100644 --- a/src/battery/battery.cpp +++ b/src/tangara/battery/battery.cpp diff --git a/src/battery/include/battery.hpp b/src/tangara/battery/battery.hpp index 314cd373..314cd373 100644 --- a/src/battery/include/battery.hpp +++ b/src/tangara/battery/battery.hpp diff --git a/src/database/database.cpp b/src/tangara/database/database.cpp index 48fb0c63..48fb0c63 100644 --- a/src/database/database.cpp +++ b/src/tangara/database/database.cpp diff --git a/src/database/include/database.hpp b/src/tangara/database/database.hpp index 35b76a13..35b76a13 100644 --- a/src/database/include/database.hpp +++ b/src/tangara/database/database.hpp diff --git a/src/database/include/db_events.hpp b/src/tangara/database/db_events.hpp index a1aefc27..a1aefc27 100644 --- a/src/database/include/db_events.hpp +++ b/src/tangara/database/db_events.hpp diff --git a/src/database/env_esp.cpp b/src/tangara/database/env_esp.cpp index f7a5637a..f7a5637a 100644 --- a/src/database/env_esp.cpp +++ b/src/tangara/database/env_esp.cpp diff --git a/src/database/include/env_esp.hpp b/src/tangara/database/env_esp.hpp index 472a72a6..472a72a6 100644 --- a/src/database/include/env_esp.hpp +++ b/src/tangara/database/env_esp.hpp diff --git a/src/database/file_gatherer.cpp b/src/tangara/database/file_gatherer.cpp index b7b7271e..b7b7271e 100644 --- a/src/database/file_gatherer.cpp +++ b/src/tangara/database/file_gatherer.cpp diff --git a/src/database/include/file_gatherer.hpp b/src/tangara/database/file_gatherer.hpp index 685bdb2c..685bdb2c 100644 --- a/src/database/include/file_gatherer.hpp +++ b/src/tangara/database/file_gatherer.hpp diff --git a/src/database/include/future_fetcher.hpp b/src/tangara/database/future_fetcher.hpp index e8ce9729..e8ce9729 100644 --- a/src/database/include/future_fetcher.hpp +++ b/src/tangara/database/future_fetcher.hpp diff --git a/src/database/index.cpp b/src/tangara/database/index.cpp index 328c3b43..328c3b43 100644 --- a/src/database/index.cpp +++ b/src/tangara/database/index.cpp diff --git a/src/database/include/index.hpp b/src/tangara/database/index.hpp index 45dae464..45dae464 100644 --- a/src/database/include/index.hpp +++ b/src/tangara/database/index.hpp diff --git a/src/database/records.cpp b/src/tangara/database/records.cpp index b086be3b..b086be3b 100644 --- a/src/database/records.cpp +++ b/src/tangara/database/records.cpp diff --git a/src/database/include/records.hpp b/src/tangara/database/records.hpp index 3ca68fea..3ca68fea 100644 --- a/src/database/include/records.hpp +++ b/src/tangara/database/records.hpp diff --git a/src/database/tag_parser.cpp b/src/tangara/database/tag_parser.cpp index cbcbdcb5..cbcbdcb5 100644 --- a/src/database/tag_parser.cpp +++ b/src/tangara/database/tag_parser.cpp diff --git a/src/database/include/tag_parser.hpp b/src/tangara/database/tag_parser.hpp index 966258b5..966258b5 100644 --- a/src/database/include/tag_parser.hpp +++ b/src/tangara/database/tag_parser.hpp diff --git a/src/database/test/CMakeLists.txt b/src/tangara/database/test/CMakeLists.txt index a9f2cedb..a9f2cedb 100644 --- a/src/database/test/CMakeLists.txt +++ b/src/tangara/database/test/CMakeLists.txt diff --git a/src/database/test/test_database.cpp b/src/tangara/database/test/test_database.cpp index 6aec9bfb..6aec9bfb 100644 --- a/src/database/test/test_database.cpp +++ b/src/tangara/database/test/test_database.cpp diff --git a/src/database/test/test_records.cpp b/src/tangara/database/test/test_records.cpp index 2f59489c..2f59489c 100644 --- a/src/database/test/test_records.cpp +++ b/src/tangara/database/test/test_records.cpp diff --git a/src/database/track.cpp b/src/tangara/database/track.cpp index 1b1442a1..1b1442a1 100644 --- a/src/database/track.cpp +++ b/src/tangara/database/track.cpp diff --git a/src/database/include/track.hpp b/src/tangara/database/track.hpp index b097ab52..b097ab52 100644 --- a/src/database/include/track.hpp +++ b/src/tangara/database/track.hpp diff --git a/src/dev_console/console.cpp b/src/tangara/dev_console/console.cpp index f2b1efea..f2b1efea 100644 --- a/src/dev_console/console.cpp +++ b/src/tangara/dev_console/console.cpp diff --git a/src/dev_console/include/console.hpp b/src/tangara/dev_console/console.hpp index fedf3632..fedf3632 100644 --- a/src/dev_console/include/console.hpp +++ b/src/tangara/dev_console/console.hpp diff --git a/src/events/event_queue.cpp b/src/tangara/events/event_queue.cpp index d3a62ef6..f8f5b1ee 100644 --- a/src/events/event_queue.cpp +++ b/src/tangara/events/event_queue.cpp @@ -4,7 +4,7 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "event_queue.hpp" +#include "events/event_queue.hpp" #include "audio_fsm.hpp" #include "freertos/FreeRTOS.h" diff --git a/src/events/include/event_queue.hpp b/src/tangara/events/event_queue.hpp index 78b21d53..78b21d53 100644 --- a/src/events/include/event_queue.hpp +++ b/src/tangara/events/event_queue.hpp diff --git a/src/input/device_factory.cpp b/src/tangara/input/device_factory.cpp index 65f4d785..65f4d785 100644 --- a/src/input/device_factory.cpp +++ b/src/tangara/input/device_factory.cpp diff --git a/src/input/include/device_factory.hpp b/src/tangara/input/device_factory.hpp index dd9c7133..dd9c7133 100644 --- a/src/input/include/device_factory.hpp +++ b/src/tangara/input/device_factory.hpp diff --git a/src/input/include/feedback_device.hpp b/src/tangara/input/feedback_device.hpp index 4faeeafd..4faeeafd 100644 --- a/src/input/include/feedback_device.hpp +++ b/src/tangara/input/feedback_device.hpp diff --git a/src/input/feedback_haptics.cpp b/src/tangara/input/feedback_haptics.cpp index 5e83d0d6..90a912ec 100644 --- a/src/input/feedback_haptics.cpp +++ b/src/tangara/input/feedback_haptics.cpp @@ -4,7 +4,7 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "feedback_haptics.hpp" +#include "input/feedback_haptics.hpp" #include <cstdint> diff --git a/src/input/include/feedback_haptics.hpp b/src/tangara/input/feedback_haptics.hpp index a307a429..a307a429 100644 --- a/src/input/include/feedback_haptics.hpp +++ b/src/tangara/input/feedback_haptics.hpp diff --git a/src/input/include/input_device.hpp b/src/tangara/input/input_device.hpp index d944c3bf..d944c3bf 100644 --- a/src/input/include/input_device.hpp +++ b/src/tangara/input/input_device.hpp diff --git a/src/input/input_hook.cpp b/src/tangara/input/input_hook.cpp index bf9f3596..d346b863 100644 --- a/src/input/input_hook.cpp +++ b/src/tangara/input/input_hook.cpp @@ -4,13 +4,15 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "input_hook.hpp" +#include "input/input_hook.hpp" #include <functional> #include <optional> + #include "hal/lv_hal_indev.h" -#include "input_trigger.hpp" -#include "lua.h" +#include "lua.hpp" + +#include "input/input_trigger.hpp" namespace input { diff --git a/src/input/include/input_hook.hpp b/src/tangara/input/input_hook.hpp index a8705210..a8705210 100644 --- a/src/input/include/input_hook.hpp +++ b/src/tangara/input/input_hook.hpp diff --git a/src/input/input_hook_actions.cpp b/src/tangara/input/input_hook_actions.cpp index 26075c4c..bc3760ac 100644 --- a/src/input/input_hook_actions.cpp +++ b/src/tangara/input/input_hook_actions.cpp @@ -4,14 +4,14 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "input_hook_actions.hpp" +#include "input/input_hook_actions.hpp" #include <cstdint> #include "hal/lv_hal_indev.h" -#include "event_queue.hpp" -#include "ui_events.hpp" +#include "events/event_queue.hpp" +#include "ui/ui_events.hpp" namespace input { namespace actions { diff --git a/src/input/include/input_hook_actions.hpp b/src/tangara/input/input_hook_actions.hpp index 105bd10d..105bd10d 100644 --- a/src/input/include/input_hook_actions.hpp +++ b/src/tangara/input/input_hook_actions.hpp diff --git a/src/input/input_nav_buttons.cpp b/src/tangara/input/input_nav_buttons.cpp index 61d80075..61d80075 100644 --- a/src/input/input_nav_buttons.cpp +++ b/src/tangara/input/input_nav_buttons.cpp diff --git a/src/input/include/input_nav_buttons.hpp b/src/tangara/input/input_nav_buttons.hpp index 9feeb375..9feeb375 100644 --- a/src/input/include/input_nav_buttons.hpp +++ b/src/tangara/input/input_nav_buttons.hpp diff --git a/src/input/input_touch_dpad.cpp b/src/tangara/input/input_touch_dpad.cpp index df17d766..f7e12fc5 100644 --- a/src/input/input_touch_dpad.cpp +++ b/src/tangara/input/input_touch_dpad.cpp @@ -4,19 +4,20 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "input_touch_dpad.hpp" +#include "input/input_touch_dpad.hpp" #include <cstdint> #include "hal/lv_hal_indev.h" -#include "event_queue.hpp" #include "haptics.hpp" -#include "input_device.hpp" -#include "input_hook_actions.hpp" -#include "input_touch_dpad.hpp" #include "touchwheel.hpp" +#include "events/event_queue.hpp" +#include "input/input_device.hpp" +#include "input/input_hook_actions.hpp" +#include "input/input_touch_dpad.hpp" + namespace input { TouchDPad::TouchDPad(drivers::TouchWheel& wheel) diff --git a/src/input/include/input_touch_dpad.hpp b/src/tangara/input/input_touch_dpad.hpp index 0c45b2d9..0c45b2d9 100644 --- a/src/input/include/input_touch_dpad.hpp +++ b/src/tangara/input/input_touch_dpad.hpp diff --git a/src/input/input_touch_wheel.cpp b/src/tangara/input/input_touch_wheel.cpp index 41fd73bc..e6a3b880 100644 --- a/src/input/input_touch_wheel.cpp +++ b/src/tangara/input/input_touch_wheel.cpp @@ -4,14 +4,14 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "input_touch_wheel.hpp" +#include "input/input_touch_wheel.hpp" #include <cstdint> #include <variant> #include "hal/lv_hal_indev.h" -#include "event_queue.hpp" +#include "events/event_queue.hpp" #include "haptics.hpp" #include "input_device.hpp" #include "input_hook_actions.hpp" diff --git a/src/input/include/input_touch_wheel.hpp b/src/tangara/input/input_touch_wheel.hpp index 764cc68d..764cc68d 100644 --- a/src/input/include/input_touch_wheel.hpp +++ b/src/tangara/input/input_touch_wheel.hpp diff --git a/src/input/input_trigger.cpp b/src/tangara/input/input_trigger.cpp index 00d4a32d..11b4dbe9 100644 --- a/src/input/input_trigger.cpp +++ b/src/tangara/input/input_trigger.cpp @@ -4,10 +4,10 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "input_trigger.hpp" -#include <sys/_stdint.h> +#include "input/input_trigger.hpp" #include <cstdint> + #include "esp_timer.h" namespace input { diff --git a/src/input/include/input_trigger.hpp b/src/tangara/input/input_trigger.hpp index bcafa8ad..bcafa8ad 100644 --- a/src/input/include/input_trigger.hpp +++ b/src/tangara/input/input_trigger.hpp diff --git a/src/input/input_volume_buttons.cpp b/src/tangara/input/input_volume_buttons.cpp index 37cf90e5..37cf90e5 100644 --- a/src/input/input_volume_buttons.cpp +++ b/src/tangara/input/input_volume_buttons.cpp diff --git a/src/input/include/input_volume_buttons.hpp b/src/tangara/input/input_volume_buttons.hpp index e3246df4..e3246df4 100644 --- a/src/input/include/input_volume_buttons.hpp +++ b/src/tangara/input/input_volume_buttons.hpp diff --git a/src/input/lvgl_input_driver.cpp b/src/tangara/input/lvgl_input_driver.cpp index a82b7438..1cd7167b 100644 --- a/src/input/lvgl_input_driver.cpp +++ b/src/tangara/input/lvgl_input_driver.cpp @@ -4,25 +4,25 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "lvgl_input_driver.hpp" -#include <stdint.h> +#include "input/lvgl_input_driver.hpp" #include <cstdint> #include <memory> #include <variant> -#include "device_factory.hpp" -#include "feedback_haptics.hpp" -#include "input_hook.hpp" -#include "input_touch_wheel.hpp" -#include "input_trigger.hpp" -#include "input_volume_buttons.hpp" -#include "lauxlib.h" -#include "lua.h" -#include "lua_thread.hpp" +#include "lua.hpp" #include "lvgl.h" + #include "nvs.hpp" -#include "property.hpp" + +#include "input/device_factory.hpp" +#include "input/feedback_haptics.hpp" +#include "input/input_hook.hpp" +#include "input/input_touch_wheel.hpp" +#include "input/input_trigger.hpp" +#include "input/input_volume_buttons.hpp" +#include "lua/lua_thread.hpp" +#include "lua/property.hpp" [[maybe_unused]] static constexpr char kTag[] = "input"; diff --git a/src/input/include/lvgl_input_driver.hpp b/src/tangara/input/lvgl_input_driver.hpp index 9adaf143..9adaf143 100644 --- a/src/input/include/lvgl_input_driver.hpp +++ b/src/tangara/input/lvgl_input_driver.hpp diff --git a/src/lua/bridge.cpp b/src/tangara/lua/bridge.cpp index cfa9d5f7..cfa9d5f7 100644 --- a/src/lua/bridge.cpp +++ b/src/tangara/lua/bridge.cpp diff --git a/src/lua/include/bridge.hpp b/src/tangara/lua/bridge.hpp index 64f14e0e..64f14e0e 100644 --- a/src/lua/include/bridge.hpp +++ b/src/tangara/lua/bridge.hpp diff --git a/src/lua/lua_controls.cpp b/src/tangara/lua/lua_controls.cpp index 2da0ed11..2da0ed11 100644 --- a/src/lua/lua_controls.cpp +++ b/src/tangara/lua/lua_controls.cpp diff --git a/src/lua/include/lua_controls.hpp b/src/tangara/lua/lua_controls.hpp index 18ad261d..18ad261d 100644 --- a/src/lua/include/lua_controls.hpp +++ b/src/tangara/lua/lua_controls.hpp diff --git a/src/lua/lua_database.cpp b/src/tangara/lua/lua_database.cpp index d0612fdd..d0612fdd 100644 --- a/src/lua/lua_database.cpp +++ b/src/tangara/lua/lua_database.cpp diff --git a/src/lua/include/lua_database.hpp b/src/tangara/lua/lua_database.hpp index b0d2acbd..b0d2acbd 100644 --- a/src/lua/include/lua_database.hpp +++ b/src/tangara/lua/lua_database.hpp diff --git a/src/lua/lua_queue.cpp b/src/tangara/lua/lua_queue.cpp index dfb820c2..dfb820c2 100644 --- a/src/lua/lua_queue.cpp +++ b/src/tangara/lua/lua_queue.cpp diff --git a/src/lua/include/lua_queue.hpp b/src/tangara/lua/lua_queue.hpp index c5cfe04d..c5cfe04d 100644 --- a/src/lua/include/lua_queue.hpp +++ b/src/tangara/lua/lua_queue.hpp diff --git a/src/lua/include/lua_registry.hpp b/src/tangara/lua/lua_registry.hpp index abc5063e..abc5063e 100644 --- a/src/lua/include/lua_registry.hpp +++ b/src/tangara/lua/lua_registry.hpp diff --git a/src/lua/lua_screen.cpp b/src/tangara/lua/lua_screen.cpp index f17f6b1a..f17f6b1a 100644 --- a/src/lua/lua_screen.cpp +++ b/src/tangara/lua/lua_screen.cpp diff --git a/src/lua/include/lua_screen.hpp b/src/tangara/lua/lua_screen.hpp index 1c3bed1a..1c3bed1a 100644 --- a/src/lua/include/lua_screen.hpp +++ b/src/tangara/lua/lua_screen.hpp diff --git a/src/lua/lua_theme.cpp b/src/tangara/lua/lua_theme.cpp index 72434d97..72434d97 100644 --- a/src/lua/lua_theme.cpp +++ b/src/tangara/lua/lua_theme.cpp diff --git a/src/lua/include/lua_theme.hpp b/src/tangara/lua/lua_theme.hpp index fed710e0..fed710e0 100644 --- a/src/lua/include/lua_theme.hpp +++ b/src/tangara/lua/lua_theme.hpp diff --git a/src/lua/lua_thread.cpp b/src/tangara/lua/lua_thread.cpp index dd72e41d..dd72e41d 100644 --- a/src/lua/lua_thread.cpp +++ b/src/tangara/lua/lua_thread.cpp diff --git a/src/lua/include/lua_thread.hpp b/src/tangara/lua/lua_thread.hpp index 384de61d..384de61d 100644 --- a/src/lua/include/lua_thread.hpp +++ b/src/tangara/lua/lua_thread.hpp diff --git a/src/lua/lua_version.cpp b/src/tangara/lua/lua_version.cpp index e5f06bb5..e5f06bb5 100644 --- a/src/lua/lua_version.cpp +++ b/src/tangara/lua/lua_version.cpp diff --git a/src/lua/include/lua_version.hpp b/src/tangara/lua/lua_version.hpp index 4ba4be94..4ba4be94 100644 --- a/src/lua/include/lua_version.hpp +++ b/src/tangara/lua/lua_version.hpp diff --git a/src/lua/property.cpp b/src/tangara/lua/property.cpp index 9f4a1908..9f4a1908 100644 --- a/src/lua/property.cpp +++ b/src/tangara/lua/property.cpp diff --git a/src/lua/include/property.hpp b/src/tangara/lua/property.hpp index 724261be..724261be 100644 --- a/src/lua/include/property.hpp +++ b/src/tangara/lua/property.hpp diff --git a/src/lua/registry.cpp b/src/tangara/lua/registry.cpp index a6487858..a6487858 100644 --- a/src/lua/registry.cpp +++ b/src/tangara/lua/registry.cpp diff --git a/src/system_fsm/booting.cpp b/src/tangara/system_fsm/booting.cpp index 44700cc4..44700cc4 100644 --- a/src/system_fsm/booting.cpp +++ b/src/tangara/system_fsm/booting.cpp diff --git a/src/system_fsm/idle.cpp b/src/tangara/system_fsm/idle.cpp index e28864b3..e28864b3 100644 --- a/src/system_fsm/idle.cpp +++ b/src/tangara/system_fsm/idle.cpp diff --git a/src/system_fsm/running.cpp b/src/tangara/system_fsm/running.cpp index 796c96dc..796c96dc 100644 --- a/src/system_fsm/running.cpp +++ b/src/tangara/system_fsm/running.cpp diff --git a/src/system_fsm/service_locator.cpp b/src/tangara/system_fsm/service_locator.cpp index d8dcf44a..d8dcf44a 100644 --- a/src/system_fsm/service_locator.cpp +++ b/src/tangara/system_fsm/service_locator.cpp diff --git a/src/system_fsm/include/service_locator.hpp b/src/tangara/system_fsm/service_locator.hpp index 5978578c..5978578c 100644 --- a/src/system_fsm/include/service_locator.hpp +++ b/src/tangara/system_fsm/service_locator.hpp diff --git a/src/system_fsm/include/system_events.hpp b/src/tangara/system_fsm/system_events.hpp index 22e3b6bd..22e3b6bd 100644 --- a/src/system_fsm/include/system_events.hpp +++ b/src/tangara/system_fsm/system_events.hpp diff --git a/src/system_fsm/system_fsm.cpp b/src/tangara/system_fsm/system_fsm.cpp index 59d41c73..59d41c73 100644 --- a/src/system_fsm/system_fsm.cpp +++ b/src/tangara/system_fsm/system_fsm.cpp diff --git a/src/system_fsm/include/system_fsm.hpp b/src/tangara/system_fsm/system_fsm.hpp index f01afb3f..f01afb3f 100644 --- a/src/system_fsm/include/system_fsm.hpp +++ b/src/tangara/system_fsm/system_fsm.hpp diff --git a/src/ui/font_fusion_10.c b/src/tangara/ui/font_fusion_10.c index 67143440..67143440 100644 --- a/src/ui/font_fusion_10.c +++ b/src/tangara/ui/font_fusion_10.c diff --git a/src/ui/font_fusion_12.c b/src/tangara/ui/font_fusion_12.c index 97c311b8..97c311b8 100644 --- a/src/ui/font_fusion_12.c +++ b/src/tangara/ui/font_fusion_12.c diff --git a/src/ui/font_symbols.c b/src/tangara/ui/font_symbols.c index abc380eb..abc380eb 100644 --- a/src/ui/font_symbols.c +++ b/src/tangara/ui/font_symbols.c diff --git a/src/ui/include/fonts.hpp b/src/tangara/ui/fonts.hpp index e4a8e139..e4a8e139 100644 --- a/src/ui/include/fonts.hpp +++ b/src/tangara/ui/fonts.hpp diff --git a/src/ui/lvgl_task.cpp b/src/tangara/ui/lvgl_task.cpp index 51da0179..51da0179 100644 --- a/src/ui/lvgl_task.cpp +++ b/src/tangara/ui/lvgl_task.cpp diff --git a/src/ui/include/lvgl_task.hpp b/src/tangara/ui/lvgl_task.hpp index 8efcbf35..8efcbf35 100644 --- a/src/ui/include/lvgl_task.hpp +++ b/src/tangara/ui/lvgl_task.hpp diff --git a/src/ui/modal.cpp b/src/tangara/ui/modal.cpp index ec541914..ec541914 100644 --- a/src/ui/modal.cpp +++ b/src/tangara/ui/modal.cpp diff --git a/src/ui/include/modal.hpp b/src/tangara/ui/modal.hpp index 6b7e792e..6b7e792e 100644 --- a/src/ui/include/modal.hpp +++ b/src/tangara/ui/modal.hpp diff --git a/src/ui/screen.cpp b/src/tangara/ui/screen.cpp index a39aaf7e..a39aaf7e 100644 --- a/src/ui/screen.cpp +++ b/src/tangara/ui/screen.cpp diff --git a/src/ui/include/screen.hpp b/src/tangara/ui/screen.hpp index 40284fda..40284fda 100644 --- a/src/ui/include/screen.hpp +++ b/src/tangara/ui/screen.hpp diff --git a/src/ui/screen_lua.cpp b/src/tangara/ui/screen_lua.cpp index 685e43cb..685e43cb 100644 --- a/src/ui/screen_lua.cpp +++ b/src/tangara/ui/screen_lua.cpp diff --git a/src/ui/include/screen_lua.hpp b/src/tangara/ui/screen_lua.hpp index 8a463bad..8a463bad 100644 --- a/src/ui/include/screen_lua.hpp +++ b/src/tangara/ui/screen_lua.hpp diff --git a/src/ui/screen_splash.cpp b/src/tangara/ui/screen_splash.cpp index 48cfef88..48cfef88 100644 --- a/src/ui/screen_splash.cpp +++ b/src/tangara/ui/screen_splash.cpp diff --git a/src/ui/include/screen_splash.hpp b/src/tangara/ui/screen_splash.hpp index 6e746345..6e746345 100644 --- a/src/ui/include/screen_splash.hpp +++ b/src/tangara/ui/screen_splash.hpp diff --git a/src/ui/splash.c b/src/tangara/ui/splash.c index 61eff739..61eff739 100644 --- a/src/ui/splash.c +++ b/src/tangara/ui/splash.c diff --git a/src/ui/themes.cpp b/src/tangara/ui/themes.cpp index b13f226a..b13f226a 100644 --- a/src/ui/themes.cpp +++ b/src/tangara/ui/themes.cpp diff --git a/src/ui/include/themes.hpp b/src/tangara/ui/themes.hpp index 09b9cdce..09b9cdce 100644 --- a/src/ui/include/themes.hpp +++ b/src/tangara/ui/themes.hpp diff --git a/src/ui/include/ui_events.hpp b/src/tangara/ui/ui_events.hpp index 3d794edc..3d794edc 100644 --- a/src/ui/include/ui_events.hpp +++ b/src/tangara/ui/ui_events.hpp diff --git a/src/ui/ui_fsm.cpp b/src/tangara/ui/ui_fsm.cpp index 1cbf1be4..1cbf1be4 100644 --- a/src/ui/ui_fsm.cpp +++ b/src/tangara/ui/ui_fsm.cpp diff --git a/src/ui/include/ui_fsm.hpp b/src/tangara/ui/ui_fsm.hpp index 325aea8f..325aea8f 100644 --- a/src/ui/include/ui_fsm.hpp +++ b/src/tangara/ui/ui_fsm.hpp diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt deleted file mode 100644 index 3814e9d5..00000000 --- a/src/ui/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2023 jacqueline <me@jacqueline.id.au> -# -# SPDX-License-Identifier: GPL-3.0-only - -idf_component_register( - SRCS "lvgl_task.cpp" "ui_fsm.cpp" "screen_splash.cpp" "themes.cpp" - "screen.cpp" "modal.cpp" "screen_lua.cpp" "splash.c" "font_fusion_12.c" - "font_fusion_10.c" - INCLUDE_DIRS "include" - REQUIRES "drivers" "lvgl" "tinyfsm" "events" "system_fsm" "database" "esp_timer" "battery" "lua" "luavgl" "esp_app_format" "input") -target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/ui/icons/battery_20.c b/src/ui/icons/battery_20.c deleted file mode 100644 index 3be6b614..00000000 --- a/src/ui/icons/battery_20.c +++ /dev/null @@ -1,52 +0,0 @@ -#ifdef __has_include - #if __has_include("lvgl.h") - #ifndef LV_LVGL_H_INCLUDE_SIMPLE - #define LV_LVGL_H_INCLUDE_SIMPLE - #endif - #endif -#endif - -#if defined(LV_LVGL_H_INCLUDE_SIMPLE) - #include "lvgl.h" -#else - #include "lvgl/lvgl.h" -#endif - - -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN -#endif - -#ifndef LV_ATTRIBUTE_IMG_BATTERY_20 -#define LV_ATTRIBUTE_IMG_BATTERY_20 -#endif - -static const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATTERY_20 uint8_t battery_20_map[] = { - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xfd, 0xfe, 0xfd, 0xff, /*Color of index 1*/ - 0x26, 0xc1, 0x38, 0xff, /*Color of index 2*/ - 0x01, 0xbe, 0x37, 0xff, /*Color of index 3*/ - - 0x55, 0x00, 0x55, - 0x54, 0x00, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xff, 0x15, - 0x54, 0x00, 0x15, -}; - -const lv_img_dsc_t kIconBattery20 = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 12, - .header.h = 12, - .data_size = 52, - .data = battery_20_map, -}; diff --git a/src/ui/icons/battery_40.c b/src/ui/icons/battery_40.c deleted file mode 100644 index 4a6ead0c..00000000 --- a/src/ui/icons/battery_40.c +++ /dev/null @@ -1,52 +0,0 @@ -#ifdef __has_include - #if __has_include("lvgl.h") - #ifndef LV_LVGL_H_INCLUDE_SIMPLE - #define LV_LVGL_H_INCLUDE_SIMPLE - #endif - #endif -#endif - -#if defined(LV_LVGL_H_INCLUDE_SIMPLE) - #include "lvgl.h" -#else - #include "lvgl/lvgl.h" -#endif - - -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN -#endif - -#ifndef LV_ATTRIBUTE_IMG_BATTERY_40 -#define LV_ATTRIBUTE_IMG_BATTERY_40 -#endif - -static const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATTERY_40 uint8_t battery_40_map[] = { - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xfd, 0xfe, 0xfd, 0xff, /*Color of index 1*/ - 0x26, 0xc1, 0x38, 0xff, /*Color of index 2*/ - 0x01, 0xbe, 0x37, 0xff, /*Color of index 3*/ - - 0x55, 0x00, 0x55, - 0x54, 0x00, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xff, 0x15, - 0x54, 0xff, 0x15, - 0x54, 0x00, 0x15, -}; - -const lv_img_dsc_t kIconBattery40 = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 12, - .header.h = 12, - .data_size = 52, - .data = battery_40_map, -}; diff --git a/src/ui/icons/battery_60.c b/src/ui/icons/battery_60.c deleted file mode 100644 index 4695cb73..00000000 --- a/src/ui/icons/battery_60.c +++ /dev/null @@ -1,52 +0,0 @@ -#ifdef __has_include - #if __has_include("lvgl.h") - #ifndef LV_LVGL_H_INCLUDE_SIMPLE - #define LV_LVGL_H_INCLUDE_SIMPLE - #endif - #endif -#endif - -#if defined(LV_LVGL_H_INCLUDE_SIMPLE) - #include "lvgl.h" -#else - #include "lvgl/lvgl.h" -#endif - - -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN -#endif - -#ifndef LV_ATTRIBUTE_IMG_BATTERY_60 -#define LV_ATTRIBUTE_IMG_BATTERY_60 -#endif - -static const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATTERY_60 uint8_t battery_60_map[] = { - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xfd, 0xfe, 0xfd, 0xff, /*Color of index 1*/ - 0x26, 0xc1, 0x38, 0xff, /*Color of index 2*/ - 0x01, 0xbe, 0x37, 0xff, /*Color of index 3*/ - - 0x55, 0x00, 0x55, - 0x54, 0x00, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xff, 0x15, - 0x54, 0xff, 0x15, - 0x54, 0x00, 0x15, -}; - -const lv_img_dsc_t kIconBattery60 = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 12, - .header.h = 12, - .data_size = 52, - .data = battery_60_map, -}; diff --git a/src/ui/icons/battery_80.c b/src/ui/icons/battery_80.c deleted file mode 100644 index e0b60dfe..00000000 --- a/src/ui/icons/battery_80.c +++ /dev/null @@ -1,52 +0,0 @@ -#ifdef __has_include - #if __has_include("lvgl.h") - #ifndef LV_LVGL_H_INCLUDE_SIMPLE - #define LV_LVGL_H_INCLUDE_SIMPLE - #endif - #endif -#endif - -#if defined(LV_LVGL_H_INCLUDE_SIMPLE) - #include "lvgl.h" -#else - #include "lvgl/lvgl.h" -#endif - - -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN -#endif - -#ifndef LV_ATTRIBUTE_IMG_BATTERY_80 -#define LV_ATTRIBUTE_IMG_BATTERY_80 -#endif - -static const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATTERY_80 uint8_t battery_80_map[] = { - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xfd, 0xfe, 0xfd, 0xff, /*Color of index 1*/ - 0x26, 0xc1, 0x38, 0xff, /*Color of index 2*/ - 0x01, 0xbe, 0x37, 0xff, /*Color of index 3*/ - - 0x55, 0x00, 0x55, - 0x54, 0x00, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0x55, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xff, 0x15, - 0x54, 0xff, 0x15, - 0x54, 0x00, 0x15, -}; - -const lv_img_dsc_t kIconBattery80 = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 12, - .header.h = 12, - .data_size = 52, - .data = battery_80_map, -}; diff --git a/src/ui/icons/battery_empty.c b/src/ui/icons/battery_empty.c deleted file mode 100644 index 26f84863..00000000 --- a/src/ui/icons/battery_empty.c +++ /dev/null @@ -1,52 +0,0 @@ -#ifdef __has_include - #if __has_include("lvgl.h") - #ifndef LV_LVGL_H_INCLUDE_SIMPLE - #define LV_LVGL_H_INCLUDE_SIMPLE - #endif - #endif -#endif - -#if defined(LV_LVGL_H_INCLUDE_SIMPLE) - #include "lvgl.h" -#else - #include "lvgl/lvgl.h" -#endif - - -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN -#endif - -#ifndef LV_ATTRIBUTE_IMG_BATTERY_EMPTY -#define LV_ATTRIBUTE_IMG_BATTERY_EMPTY -#endif - -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATTERY_EMPTY uint8_t battery_empty_map[] = { - 0xfd, 0xfd, 0xfd, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ - 0x26, 0x2c, 0xfa, 0xff, /*Color of index 2*/ - 0x00, 0x00, 0x00, 0x00, /*Color of index 3*/ - - 0x00, 0x55, 0x00, - 0x01, 0x55, 0x40, - 0x01, 0x00, 0x40, - 0x01, 0x00, 0x40, - 0x01, 0x00, 0x40, - 0x01, 0x00, 0x40, - 0x01, 0x00, 0x40, - 0x01, 0x00, 0x40, - 0x01, 0x00, 0x40, - 0x01, 0xaa, 0x40, - 0x01, 0xaa, 0x40, - 0x01, 0x55, 0x40, -}; - -const lv_img_dsc_t kIconBatteryEmpty = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 12, - .header.h = 12, - .data_size = 52, - .data = battery_empty_map, -}; diff --git a/src/ui/icons/battery_full.c b/src/ui/icons/battery_full.c deleted file mode 100644 index 1e3b17e3..00000000 --- a/src/ui/icons/battery_full.c +++ /dev/null @@ -1,52 +0,0 @@ -#ifdef __has_include - #if __has_include("lvgl.h") - #ifndef LV_LVGL_H_INCLUDE_SIMPLE - #define LV_LVGL_H_INCLUDE_SIMPLE - #endif - #endif -#endif - -#if defined(LV_LVGL_H_INCLUDE_SIMPLE) - #include "lvgl.h" -#else - #include "lvgl/lvgl.h" -#endif - - -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN -#endif - -#ifndef LV_ATTRIBUTE_IMG_BATTERY_FULL -#define LV_ATTRIBUTE_IMG_BATTERY_FULL -#endif - -const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATTERY_FULL uint8_t battery_full_map[] = { - 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ - 0xfd, 0xfe, 0xfd, 0xff, /*Color of index 1*/ - 0x26, 0xc1, 0x38, 0xff, /*Color of index 2*/ - 0x01, 0xbe, 0x37, 0xff, /*Color of index 3*/ - - 0x55, 0x00, 0x55, - 0x54, 0x00, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xaa, 0x15, - 0x54, 0xff, 0x15, - 0x54, 0xff, 0x15, - 0x54, 0x00, 0x15, -}; - -const lv_img_dsc_t kIconBatteryFull = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 12, - .header.h = 12, - .data_size = 52, - .data = battery_full_map, -}; diff --git a/src/ui/icons/bluetooth.c b/src/ui/icons/bluetooth.c deleted file mode 100644 index 66322f8f..00000000 --- a/src/ui/icons/bluetooth.c +++ /dev/null @@ -1,54 +0,0 @@ -#ifdef __has_include - #if __has_include("lvgl.h") - #ifndef LV_LVGL_H_INCLUDE_SIMPLE - #define LV_LVGL_H_INCLUDE_SIMPLE - #endif - #endif -#endif - -#if defined(LV_LVGL_H_INCLUDE_SIMPLE) - #include "lvgl.h" -#else - #include "lvgl/lvgl.h" -#endif - - -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN -#endif - -#ifndef LV_ATTRIBUTE_IMG_BLUETOOTH -#define LV_ATTRIBUTE_IMG_BLUETOOTH -#endif - -static const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH uint8_t bluetooth_map[] = { - 0xfe, 0xfe, 0xfe, 0xff, /*Color of index 0*/ - 0xff, 0x75, 0x00, 0xff, /*Color of index 1*/ - 0x00, 0x00, 0x00, 0x00, /*Color of index 2*/ - 0x00, 0x00, 0x00, 0x00, /*Color of index 3*/ - - 0x00, 0x55, 0x40, 0x00, - 0x01, 0x51, 0x50, 0x00, - 0x05, 0x50, 0x54, 0x00, - 0x05, 0x51, 0x14, 0x00, - 0x05, 0x11, 0x04, 0x00, - 0x15, 0x40, 0x15, 0x00, - 0x15, 0x50, 0x55, 0x00, - 0x15, 0x40, 0x15, 0x00, - 0x05, 0x11, 0x04, 0x00, - 0x05, 0x51, 0x14, 0x00, - 0x05, 0x50, 0x54, 0x00, - 0x01, 0x51, 0x50, 0x00, - 0x00, 0x55, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -const lv_img_dsc_t kIconBluetooth = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 14, - .header.h = 14, - .data_size = 72, - .data = bluetooth_map, -}; diff --git a/src/ui/icons/pause.c b/src/ui/icons/pause.c deleted file mode 100644 index 8201b5bb..00000000 --- a/src/ui/icons/pause.c +++ /dev/null @@ -1,54 +0,0 @@ -#ifdef __has_include - #if __has_include("lvgl.h") - #ifndef LV_LVGL_H_INCLUDE_SIMPLE - #define LV_LVGL_H_INCLUDE_SIMPLE - #endif - #endif -#endif - -#if defined(LV_LVGL_H_INCLUDE_SIMPLE) - #include "lvgl.h" -#else - #include "lvgl/lvgl.h" -#endif - - -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN -#endif - -#ifndef LV_ATTRIBUTE_IMG_PAUSE -#define LV_ATTRIBUTE_IMG_PAUSE -#endif - -static const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_PAUSE uint8_t pause_map[] = { - 0xfe, 0xfe, 0xfe, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ - 0x00, 0x00, 0x00, 0x00, /*Color of index 2*/ - 0x00, 0x00, 0x00, 0x00, /*Color of index 3*/ - - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x50, 0x14, 0x00, - 0x00, 0x50, 0x14, 0x00, - 0x00, 0x50, 0x14, 0x00, - 0x00, 0x50, 0x14, 0x00, - 0x00, 0x50, 0x14, 0x00, - 0x00, 0x50, 0x14, 0x00, - 0x00, 0x50, 0x14, 0x00, - 0x00, 0x50, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -const lv_img_dsc_t kIconPause = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 14, - .header.h = 14, - .data_size = 72, - .data = pause_map, -}; diff --git a/src/ui/icons/play.c b/src/ui/icons/play.c deleted file mode 100644 index 8984eae4..00000000 --- a/src/ui/icons/play.c +++ /dev/null @@ -1,54 +0,0 @@ -#ifdef __has_include - #if __has_include("lvgl.h") - #ifndef LV_LVGL_H_INCLUDE_SIMPLE - #define LV_LVGL_H_INCLUDE_SIMPLE - #endif - #endif -#endif - -#if defined(LV_LVGL_H_INCLUDE_SIMPLE) - #include "lvgl.h" -#else - #include "lvgl/lvgl.h" -#endif - - -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN -#endif - -#ifndef LV_ATTRIBUTE_IMG_PLAY -#define LV_ATTRIBUTE_IMG_PLAY -#endif - -static const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_PLAY uint8_t play_map[] = { - 0xfe, 0xfe, 0xfe, 0xff, /*Color of index 0*/ - 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ - 0x00, 0x00, 0x00, 0x00, /*Color of index 2*/ - 0x00, 0x00, 0x00, 0x00, /*Color of index 3*/ - - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x50, 0x00, 0x00, - 0x00, 0x55, 0x00, 0x00, - 0x00, 0x55, 0x50, 0x00, - 0x00, 0x55, 0x54, 0x00, - 0x00, 0x55, 0x54, 0x00, - 0x00, 0x55, 0x50, 0x00, - 0x00, 0x55, 0x00, 0x00, - 0x00, 0x50, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -const lv_img_dsc_t kIconPlay = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, - .header.w = 14, - .header.h = 14, - .data_size = 72, - .data = play_map, -}; diff --git a/src/ui/include/ui_tick.hpp b/src/ui/include/ui_tick.hpp deleted file mode 100644 index 37f8a8bd..00000000 --- a/src/ui/include/ui_tick.hpp +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright 2023 jacqueline <me@jacqueline.id.au> - * - * SPDX-License-Identifier: GPL-3.0-only - */ - -#pragma once - -#include "esp_timer.h" - -#define LV_TICK_CUSTOM_SYS_TIME_EXPR (esp_timer_get_time() / 1000) diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index e1913920..49554be8 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -2,4 +2,4 @@ # # SPDX-License-Identifier: GPL-3.0-only -idf_component_register(SRCS INCLUDE_DIRS "include" REQUIRES "database") +idf_component_register(SRCS INCLUDE_DIRS "include" REQUIRES "memory") |
