diff --git a/lib/lvgl/env_support/cmake/esp.cmake b/lib/lvgl/env_support/cmake/esp.cmake index 443fb514..4b4b91da 100644 --- a/lib/lvgl/env_support/cmake/esp.cmake +++ b/lib/lvgl/env_support/cmake/esp.cmake @@ -27,7 +27,6 @@ else() ${LVGL_ROOT_DIR} ${LVGL_ROOT_DIR}/src ${LVGL_ROOT_DIR}/../ - $ENV{PROJ_PATH}/src/ui/include/ REQUIRES esp_timer) target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE") diff --git a/lib/lvgl/lv_conf.h b/lib/lvgl/lv_conf.h index fdaeb390..9617d253 100644 --- a/lib/lvgl/lv_conf.h +++ b/lib/lvgl/lv_conf.h @@ -87,7 +87,8 @@ *It removes the need to manually update the tick with `lv_tick_inc()`)*/ #define LV_TICK_CUSTOM 1 #if LV_TICK_CUSTOM - #define LV_TICK_CUSTOM_INCLUDE "ui_tick.hpp" /*Header for the system time function*/ + #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h" + #define LV_TICK_CUSTOM_SYS_TIME_EXPR (esp_timer_get_time() / 1000) #endif /*LV_TICK_CUSTOM*/ /*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings. 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 -# -# 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 -# -# 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 -# -# 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 -# -# 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 -# -# 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 -#include #include #include @@ -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 -# -# 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 -# -# 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 -# -# 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 -# -# 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 +# +# 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 similarity index 98% rename from src/app_console/app_console.cpp rename to 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 -#include -#include #include #include @@ -21,11 +19,7 @@ #include #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 similarity index 100% rename from src/app_console/include/app_console.hpp rename to src/tangara/app_console/app_console.hpp diff --git a/src/audio/README.md b/src/tangara/audio/README.md similarity index 100% rename from src/audio/README.md rename to src/tangara/audio/README.md diff --git a/src/audio/audio_converter.cpp b/src/tangara/audio/audio_converter.cpp similarity index 100% rename from src/audio/audio_converter.cpp rename to src/tangara/audio/audio_converter.cpp diff --git a/src/audio/include/audio_converter.hpp b/src/tangara/audio/audio_converter.hpp similarity index 100% rename from src/audio/include/audio_converter.hpp rename to src/tangara/audio/audio_converter.hpp diff --git a/src/audio/audio_decoder.cpp b/src/tangara/audio/audio_decoder.cpp similarity index 99% rename from src/audio/audio_decoder.cpp rename to 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 -#include - #include #include #include #include +#include #include #include #include #include #include -#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 similarity index 100% rename from src/audio/include/audio_decoder.hpp rename to src/tangara/audio/audio_decoder.hpp diff --git a/src/audio/include/audio_events.hpp b/src/tangara/audio/audio_events.hpp similarity index 100% rename from src/audio/include/audio_events.hpp rename to src/tangara/audio/audio_events.hpp diff --git a/src/audio/audio_fsm.cpp b/src/tangara/audio/audio_fsm.cpp similarity index 100% rename from src/audio/audio_fsm.cpp rename to src/tangara/audio/audio_fsm.cpp diff --git a/src/audio/include/audio_fsm.hpp b/src/tangara/audio/audio_fsm.hpp similarity index 100% rename from src/audio/include/audio_fsm.hpp rename to src/tangara/audio/audio_fsm.hpp diff --git a/src/audio/include/audio_sink.hpp b/src/tangara/audio/audio_sink.hpp similarity index 100% rename from src/audio/include/audio_sink.hpp rename to src/tangara/audio/audio_sink.hpp diff --git a/src/audio/audio_source.cpp b/src/tangara/audio/audio_source.cpp similarity index 100% rename from src/audio/audio_source.cpp rename to src/tangara/audio/audio_source.cpp diff --git a/src/audio/include/audio_source.hpp b/src/tangara/audio/audio_source.hpp similarity index 100% rename from src/audio/include/audio_source.hpp rename to src/tangara/audio/audio_source.hpp diff --git a/src/audio/bt_audio_output.cpp b/src/tangara/audio/bt_audio_output.cpp similarity index 100% rename from src/audio/bt_audio_output.cpp rename to 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 similarity index 100% rename from src/audio/include/bt_audio_output.hpp rename to src/tangara/audio/bt_audio_output.hpp diff --git a/src/audio/fatfs_audio_input.cpp b/src/tangara/audio/fatfs_audio_input.cpp similarity index 100% rename from src/audio/fatfs_audio_input.cpp rename to 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 similarity index 100% rename from src/audio/include/fatfs_audio_input.hpp rename to src/tangara/audio/fatfs_audio_input.hpp diff --git a/src/audio/fatfs_source.cpp b/src/tangara/audio/fatfs_source.cpp similarity index 100% rename from src/audio/fatfs_source.cpp rename to src/tangara/audio/fatfs_source.cpp diff --git a/src/audio/include/fatfs_source.hpp b/src/tangara/audio/fatfs_source.hpp similarity index 100% rename from src/audio/include/fatfs_source.hpp rename to src/tangara/audio/fatfs_source.hpp diff --git a/src/audio/i2s_audio_output.cpp b/src/tangara/audio/i2s_audio_output.cpp similarity index 100% rename from src/audio/i2s_audio_output.cpp rename to 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 similarity index 100% rename from src/audio/include/i2s_audio_output.hpp rename to src/tangara/audio/i2s_audio_output.hpp diff --git a/src/audio/readahead_source.cpp b/src/tangara/audio/readahead_source.cpp similarity index 100% rename from src/audio/readahead_source.cpp rename to src/tangara/audio/readahead_source.cpp diff --git a/src/audio/include/readahead_source.hpp b/src/tangara/audio/readahead_source.hpp similarity index 100% rename from src/audio/include/readahead_source.hpp rename to src/tangara/audio/readahead_source.hpp diff --git a/src/audio/resample.cpp b/src/tangara/audio/resample.cpp similarity index 100% rename from src/audio/resample.cpp rename to src/tangara/audio/resample.cpp diff --git a/src/audio/include/resample.hpp b/src/tangara/audio/resample.hpp similarity index 100% rename from src/audio/include/resample.hpp rename to src/tangara/audio/resample.hpp diff --git a/src/audio/test/CMakeLists.txt b/src/tangara/audio/test/CMakeLists.txt similarity index 100% rename from src/audio/test/CMakeLists.txt rename to src/tangara/audio/test/CMakeLists.txt diff --git a/src/audio/track_queue.cpp b/src/tangara/audio/track_queue.cpp similarity index 100% rename from src/audio/track_queue.cpp rename to src/tangara/audio/track_queue.cpp diff --git a/src/audio/include/track_queue.hpp b/src/tangara/audio/track_queue.hpp similarity index 100% rename from src/audio/include/track_queue.hpp rename to src/tangara/audio/track_queue.hpp diff --git a/src/battery/battery.cpp b/src/tangara/battery/battery.cpp similarity index 100% rename from src/battery/battery.cpp rename to src/tangara/battery/battery.cpp diff --git a/src/battery/include/battery.hpp b/src/tangara/battery/battery.hpp similarity index 100% rename from src/battery/include/battery.hpp rename to src/tangara/battery/battery.hpp diff --git a/src/database/database.cpp b/src/tangara/database/database.cpp similarity index 100% rename from src/database/database.cpp rename to src/tangara/database/database.cpp diff --git a/src/database/include/database.hpp b/src/tangara/database/database.hpp similarity index 100% rename from src/database/include/database.hpp rename to src/tangara/database/database.hpp diff --git a/src/database/include/db_events.hpp b/src/tangara/database/db_events.hpp similarity index 100% rename from src/database/include/db_events.hpp rename to src/tangara/database/db_events.hpp diff --git a/src/database/env_esp.cpp b/src/tangara/database/env_esp.cpp similarity index 100% rename from src/database/env_esp.cpp rename to src/tangara/database/env_esp.cpp diff --git a/src/database/include/env_esp.hpp b/src/tangara/database/env_esp.hpp similarity index 100% rename from src/database/include/env_esp.hpp rename to src/tangara/database/env_esp.hpp diff --git a/src/database/file_gatherer.cpp b/src/tangara/database/file_gatherer.cpp similarity index 100% rename from src/database/file_gatherer.cpp rename to src/tangara/database/file_gatherer.cpp diff --git a/src/database/include/file_gatherer.hpp b/src/tangara/database/file_gatherer.hpp similarity index 100% rename from src/database/include/file_gatherer.hpp rename to src/tangara/database/file_gatherer.hpp diff --git a/src/database/include/future_fetcher.hpp b/src/tangara/database/future_fetcher.hpp similarity index 100% rename from src/database/include/future_fetcher.hpp rename to src/tangara/database/future_fetcher.hpp diff --git a/src/database/index.cpp b/src/tangara/database/index.cpp similarity index 100% rename from src/database/index.cpp rename to src/tangara/database/index.cpp diff --git a/src/database/include/index.hpp b/src/tangara/database/index.hpp similarity index 100% rename from src/database/include/index.hpp rename to src/tangara/database/index.hpp diff --git a/src/database/records.cpp b/src/tangara/database/records.cpp similarity index 100% rename from src/database/records.cpp rename to src/tangara/database/records.cpp diff --git a/src/database/include/records.hpp b/src/tangara/database/records.hpp similarity index 100% rename from src/database/include/records.hpp rename to src/tangara/database/records.hpp diff --git a/src/database/tag_parser.cpp b/src/tangara/database/tag_parser.cpp similarity index 100% rename from src/database/tag_parser.cpp rename to src/tangara/database/tag_parser.cpp diff --git a/src/database/include/tag_parser.hpp b/src/tangara/database/tag_parser.hpp similarity index 100% rename from src/database/include/tag_parser.hpp rename to src/tangara/database/tag_parser.hpp diff --git a/src/database/test/CMakeLists.txt b/src/tangara/database/test/CMakeLists.txt similarity index 100% rename from src/database/test/CMakeLists.txt rename to src/tangara/database/test/CMakeLists.txt diff --git a/src/database/test/test_database.cpp b/src/tangara/database/test/test_database.cpp similarity index 100% rename from src/database/test/test_database.cpp rename to src/tangara/database/test/test_database.cpp diff --git a/src/database/test/test_records.cpp b/src/tangara/database/test/test_records.cpp similarity index 100% rename from src/database/test/test_records.cpp rename to src/tangara/database/test/test_records.cpp diff --git a/src/database/track.cpp b/src/tangara/database/track.cpp similarity index 100% rename from src/database/track.cpp rename to src/tangara/database/track.cpp diff --git a/src/database/include/track.hpp b/src/tangara/database/track.hpp similarity index 100% rename from src/database/include/track.hpp rename to src/tangara/database/track.hpp diff --git a/src/dev_console/console.cpp b/src/tangara/dev_console/console.cpp similarity index 100% rename from src/dev_console/console.cpp rename to src/tangara/dev_console/console.cpp diff --git a/src/dev_console/include/console.hpp b/src/tangara/dev_console/console.hpp similarity index 100% rename from src/dev_console/include/console.hpp rename to src/tangara/dev_console/console.hpp diff --git a/src/events/event_queue.cpp b/src/tangara/events/event_queue.cpp similarity index 96% rename from src/events/event_queue.cpp rename to 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 similarity index 100% rename from src/events/include/event_queue.hpp rename to src/tangara/events/event_queue.hpp diff --git a/src/input/device_factory.cpp b/src/tangara/input/device_factory.cpp similarity index 100% rename from src/input/device_factory.cpp rename to src/tangara/input/device_factory.cpp diff --git a/src/input/include/device_factory.hpp b/src/tangara/input/device_factory.hpp similarity index 100% rename from src/input/include/device_factory.hpp rename to src/tangara/input/device_factory.hpp diff --git a/src/input/include/feedback_device.hpp b/src/tangara/input/feedback_device.hpp similarity index 100% rename from src/input/include/feedback_device.hpp rename to src/tangara/input/feedback_device.hpp diff --git a/src/input/feedback_haptics.cpp b/src/tangara/input/feedback_haptics.cpp similarity index 94% rename from src/input/feedback_haptics.cpp rename to 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 diff --git a/src/input/include/feedback_haptics.hpp b/src/tangara/input/feedback_haptics.hpp similarity index 100% rename from src/input/include/feedback_haptics.hpp rename to src/tangara/input/feedback_haptics.hpp diff --git a/src/input/include/input_device.hpp b/src/tangara/input/input_device.hpp similarity index 100% rename from src/input/include/input_device.hpp rename to src/tangara/input/input_device.hpp diff --git a/src/input/input_hook.cpp b/src/tangara/input/input_hook.cpp similarity index 96% rename from src/input/input_hook.cpp rename to 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 #include + #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 similarity index 100% rename from src/input/include/input_hook.hpp rename to src/tangara/input/input_hook.hpp diff --git a/src/input/input_hook_actions.cpp b/src/tangara/input/input_hook_actions.cpp similarity index 95% rename from src/input/input_hook_actions.cpp rename to 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 #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 similarity index 100% rename from src/input/include/input_hook_actions.hpp rename to src/tangara/input/input_hook_actions.hpp diff --git a/src/input/input_nav_buttons.cpp b/src/tangara/input/input_nav_buttons.cpp similarity index 100% rename from src/input/input_nav_buttons.cpp rename to 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 similarity index 100% rename from src/input/include/input_nav_buttons.hpp rename to src/tangara/input/input_nav_buttons.hpp diff --git a/src/input/input_touch_dpad.cpp b/src/tangara/input/input_touch_dpad.cpp similarity index 89% rename from src/input/input_touch_dpad.cpp rename to 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 #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 similarity index 100% rename from src/input/include/input_touch_dpad.hpp rename to src/tangara/input/input_touch_dpad.hpp diff --git a/src/input/input_touch_wheel.cpp b/src/tangara/input/input_touch_wheel.cpp similarity index 98% rename from src/input/input_touch_wheel.cpp rename to 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 #include #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 similarity index 100% rename from src/input/include/input_touch_wheel.hpp rename to src/tangara/input/input_touch_wheel.hpp diff --git a/src/input/input_trigger.cpp b/src/tangara/input/input_trigger.cpp similarity index 97% rename from src/input/input_trigger.cpp rename to 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 +#include "input/input_trigger.hpp" #include + #include "esp_timer.h" namespace input { diff --git a/src/input/include/input_trigger.hpp b/src/tangara/input/input_trigger.hpp similarity index 100% rename from src/input/include/input_trigger.hpp rename to src/tangara/input/input_trigger.hpp diff --git a/src/input/input_volume_buttons.cpp b/src/tangara/input/input_volume_buttons.cpp similarity index 100% rename from src/input/input_volume_buttons.cpp rename to 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 similarity index 100% rename from src/input/include/input_volume_buttons.hpp rename to src/tangara/input/input_volume_buttons.hpp diff --git a/src/input/lvgl_input_driver.cpp b/src/tangara/input/lvgl_input_driver.cpp similarity index 95% rename from src/input/lvgl_input_driver.cpp rename to 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 +#include "input/lvgl_input_driver.hpp" #include #include #include -#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 similarity index 100% rename from src/input/include/lvgl_input_driver.hpp rename to src/tangara/input/lvgl_input_driver.hpp diff --git a/src/lua/bridge.cpp b/src/tangara/lua/bridge.cpp similarity index 100% rename from src/lua/bridge.cpp rename to src/tangara/lua/bridge.cpp diff --git a/src/lua/include/bridge.hpp b/src/tangara/lua/bridge.hpp similarity index 100% rename from src/lua/include/bridge.hpp rename to src/tangara/lua/bridge.hpp diff --git a/src/lua/lua_controls.cpp b/src/tangara/lua/lua_controls.cpp similarity index 100% rename from src/lua/lua_controls.cpp rename to src/tangara/lua/lua_controls.cpp diff --git a/src/lua/include/lua_controls.hpp b/src/tangara/lua/lua_controls.hpp similarity index 100% rename from src/lua/include/lua_controls.hpp rename to src/tangara/lua/lua_controls.hpp diff --git a/src/lua/lua_database.cpp b/src/tangara/lua/lua_database.cpp similarity index 100% rename from src/lua/lua_database.cpp rename to src/tangara/lua/lua_database.cpp diff --git a/src/lua/include/lua_database.hpp b/src/tangara/lua/lua_database.hpp similarity index 100% rename from src/lua/include/lua_database.hpp rename to src/tangara/lua/lua_database.hpp diff --git a/src/lua/lua_queue.cpp b/src/tangara/lua/lua_queue.cpp similarity index 100% rename from src/lua/lua_queue.cpp rename to src/tangara/lua/lua_queue.cpp diff --git a/src/lua/include/lua_queue.hpp b/src/tangara/lua/lua_queue.hpp similarity index 100% rename from src/lua/include/lua_queue.hpp rename to src/tangara/lua/lua_queue.hpp diff --git a/src/lua/include/lua_registry.hpp b/src/tangara/lua/lua_registry.hpp similarity index 100% rename from src/lua/include/lua_registry.hpp rename to src/tangara/lua/lua_registry.hpp diff --git a/src/lua/lua_screen.cpp b/src/tangara/lua/lua_screen.cpp similarity index 100% rename from src/lua/lua_screen.cpp rename to src/tangara/lua/lua_screen.cpp diff --git a/src/lua/include/lua_screen.hpp b/src/tangara/lua/lua_screen.hpp similarity index 100% rename from src/lua/include/lua_screen.hpp rename to src/tangara/lua/lua_screen.hpp diff --git a/src/lua/lua_theme.cpp b/src/tangara/lua/lua_theme.cpp similarity index 100% rename from src/lua/lua_theme.cpp rename to src/tangara/lua/lua_theme.cpp diff --git a/src/lua/include/lua_theme.hpp b/src/tangara/lua/lua_theme.hpp similarity index 100% rename from src/lua/include/lua_theme.hpp rename to src/tangara/lua/lua_theme.hpp diff --git a/src/lua/lua_thread.cpp b/src/tangara/lua/lua_thread.cpp similarity index 100% rename from src/lua/lua_thread.cpp rename to src/tangara/lua/lua_thread.cpp diff --git a/src/lua/include/lua_thread.hpp b/src/tangara/lua/lua_thread.hpp similarity index 100% rename from src/lua/include/lua_thread.hpp rename to src/tangara/lua/lua_thread.hpp diff --git a/src/lua/lua_version.cpp b/src/tangara/lua/lua_version.cpp similarity index 100% rename from src/lua/lua_version.cpp rename to src/tangara/lua/lua_version.cpp diff --git a/src/lua/include/lua_version.hpp b/src/tangara/lua/lua_version.hpp similarity index 100% rename from src/lua/include/lua_version.hpp rename to src/tangara/lua/lua_version.hpp diff --git a/src/lua/property.cpp b/src/tangara/lua/property.cpp similarity index 100% rename from src/lua/property.cpp rename to src/tangara/lua/property.cpp diff --git a/src/lua/include/property.hpp b/src/tangara/lua/property.hpp similarity index 100% rename from src/lua/include/property.hpp rename to src/tangara/lua/property.hpp diff --git a/src/lua/registry.cpp b/src/tangara/lua/registry.cpp similarity index 100% rename from src/lua/registry.cpp rename to src/tangara/lua/registry.cpp diff --git a/src/system_fsm/booting.cpp b/src/tangara/system_fsm/booting.cpp similarity index 100% rename from src/system_fsm/booting.cpp rename to src/tangara/system_fsm/booting.cpp diff --git a/src/system_fsm/idle.cpp b/src/tangara/system_fsm/idle.cpp similarity index 100% rename from src/system_fsm/idle.cpp rename to src/tangara/system_fsm/idle.cpp diff --git a/src/system_fsm/running.cpp b/src/tangara/system_fsm/running.cpp similarity index 100% rename from src/system_fsm/running.cpp rename to src/tangara/system_fsm/running.cpp diff --git a/src/system_fsm/service_locator.cpp b/src/tangara/system_fsm/service_locator.cpp similarity index 100% rename from src/system_fsm/service_locator.cpp rename to 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 similarity index 100% rename from src/system_fsm/include/service_locator.hpp rename to 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 similarity index 100% rename from src/system_fsm/include/system_events.hpp rename to src/tangara/system_fsm/system_events.hpp diff --git a/src/system_fsm/system_fsm.cpp b/src/tangara/system_fsm/system_fsm.cpp similarity index 100% rename from src/system_fsm/system_fsm.cpp rename to 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 similarity index 100% rename from src/system_fsm/include/system_fsm.hpp rename to src/tangara/system_fsm/system_fsm.hpp diff --git a/src/ui/font_fusion_10.c b/src/tangara/ui/font_fusion_10.c similarity index 100% rename from src/ui/font_fusion_10.c rename to src/tangara/ui/font_fusion_10.c diff --git a/src/ui/font_fusion_12.c b/src/tangara/ui/font_fusion_12.c similarity index 100% rename from src/ui/font_fusion_12.c rename to src/tangara/ui/font_fusion_12.c diff --git a/src/ui/font_symbols.c b/src/tangara/ui/font_symbols.c similarity index 100% rename from src/ui/font_symbols.c rename to src/tangara/ui/font_symbols.c diff --git a/src/ui/include/fonts.hpp b/src/tangara/ui/fonts.hpp similarity index 100% rename from src/ui/include/fonts.hpp rename to src/tangara/ui/fonts.hpp diff --git a/src/ui/lvgl_task.cpp b/src/tangara/ui/lvgl_task.cpp similarity index 100% rename from src/ui/lvgl_task.cpp rename to src/tangara/ui/lvgl_task.cpp diff --git a/src/ui/include/lvgl_task.hpp b/src/tangara/ui/lvgl_task.hpp similarity index 100% rename from src/ui/include/lvgl_task.hpp rename to src/tangara/ui/lvgl_task.hpp diff --git a/src/ui/modal.cpp b/src/tangara/ui/modal.cpp similarity index 100% rename from src/ui/modal.cpp rename to src/tangara/ui/modal.cpp diff --git a/src/ui/include/modal.hpp b/src/tangara/ui/modal.hpp similarity index 100% rename from src/ui/include/modal.hpp rename to src/tangara/ui/modal.hpp diff --git a/src/ui/screen.cpp b/src/tangara/ui/screen.cpp similarity index 100% rename from src/ui/screen.cpp rename to src/tangara/ui/screen.cpp diff --git a/src/ui/include/screen.hpp b/src/tangara/ui/screen.hpp similarity index 100% rename from src/ui/include/screen.hpp rename to src/tangara/ui/screen.hpp diff --git a/src/ui/screen_lua.cpp b/src/tangara/ui/screen_lua.cpp similarity index 100% rename from src/ui/screen_lua.cpp rename to src/tangara/ui/screen_lua.cpp diff --git a/src/ui/include/screen_lua.hpp b/src/tangara/ui/screen_lua.hpp similarity index 100% rename from src/ui/include/screen_lua.hpp rename to src/tangara/ui/screen_lua.hpp diff --git a/src/ui/screen_splash.cpp b/src/tangara/ui/screen_splash.cpp similarity index 100% rename from src/ui/screen_splash.cpp rename to src/tangara/ui/screen_splash.cpp diff --git a/src/ui/include/screen_splash.hpp b/src/tangara/ui/screen_splash.hpp similarity index 100% rename from src/ui/include/screen_splash.hpp rename to src/tangara/ui/screen_splash.hpp diff --git a/src/ui/splash.c b/src/tangara/ui/splash.c similarity index 100% rename from src/ui/splash.c rename to src/tangara/ui/splash.c diff --git a/src/ui/themes.cpp b/src/tangara/ui/themes.cpp similarity index 100% rename from src/ui/themes.cpp rename to src/tangara/ui/themes.cpp diff --git a/src/ui/include/themes.hpp b/src/tangara/ui/themes.hpp similarity index 100% rename from src/ui/include/themes.hpp rename to src/tangara/ui/themes.hpp diff --git a/src/ui/include/ui_events.hpp b/src/tangara/ui/ui_events.hpp similarity index 100% rename from src/ui/include/ui_events.hpp rename to src/tangara/ui/ui_events.hpp diff --git a/src/ui/ui_fsm.cpp b/src/tangara/ui/ui_fsm.cpp similarity index 100% rename from src/ui/ui_fsm.cpp rename to src/tangara/ui/ui_fsm.cpp diff --git a/src/ui/include/ui_fsm.hpp b/src/tangara/ui/ui_fsm.hpp similarity index 100% rename from src/ui/include/ui_fsm.hpp rename to 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 -# -# 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 - * - * 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")