Merge develop into main (#312)
- Move various settings to `/data/settings` and `/sdcard/settings` - Fix for `Gui` and `Statusbar` errors on startup (LVGL start) - Implement Development service settings as properties file - Rename `service::findManifestId()` to `service::findManifestById()` - Renamed various classes like `BootProperties` to `BootSettings` - Renamed `settings.properties` to `system.properties`. Code was moved to `settings` namespace/folder - `DevelopmentSettings` is now in `settings` namespace/folder (moved from service)
This commit is contained in:
committed by
GitHub
parent
5dfc6d70da
commit
5cc5b50694
@@ -1,4 +1,3 @@
|
||||
#include <Tactility/app/display/DisplaySettings.h>
|
||||
#include <Tactility/hal/Configuration.h>
|
||||
#include <Tactility/hal/encoder/EncoderDevice.h>
|
||||
#include <Tactility/hal/display/DisplayDevice.h>
|
||||
@@ -9,6 +8,7 @@
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/kernel/SystemEvents.h>
|
||||
#include <Tactility/service/ServiceRegistration.h>
|
||||
#include <Tactility/settings/DisplaySettings.h>
|
||||
#include <Tactility/TactilityHeadless.h>
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
@@ -93,7 +93,8 @@ void start() {
|
||||
TT_LOG_I(TAG, "Started %s", display->getName().c_str());
|
||||
auto lvgl_display = display->getLvglDisplay();
|
||||
assert(lvgl_display != nullptr);
|
||||
lv_display_rotation_t rotation = app::display::getRotation();
|
||||
auto settings = settings::display::loadOrGetDefault();
|
||||
lv_display_rotation_t rotation = settings::display::toLvglDisplayRotation(settings.orientation);
|
||||
if (rotation != lv_display_get_rotation(lvgl_display)) {
|
||||
lv_display_set_rotation(lvgl_display, rotation);
|
||||
}
|
||||
@@ -158,16 +159,24 @@ void start() {
|
||||
|
||||
// Restart services
|
||||
|
||||
if (service::getState("Gui") == service::State::Stopped) {
|
||||
service::startService("Gui");
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Gui service is not in Stopped state");
|
||||
// We search for the manifest first, because during the initial start() during boot
|
||||
// the service won't be registered yet.
|
||||
if (service::findManifestById("Gui") != nullptr) {
|
||||
if (service::getState("Gui") == service::State::Stopped) {
|
||||
service::startService("Gui");
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Gui service is not in Stopped state");
|
||||
}
|
||||
}
|
||||
|
||||
if (service::getState("Statusbar") == service::State::Stopped) {
|
||||
service::startService("Statusbar");
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Statusbar service is not in Stopped state");
|
||||
// We search for the manifest first, because during the initial start() during boot
|
||||
// the service won't be registered yet.
|
||||
if (service::findManifestById("Statusbar") != nullptr) {
|
||||
if (service::getState("Statusbar") == service::State::Stopped) {
|
||||
service::startService("Statusbar");
|
||||
} else {
|
||||
TT_LOG_E(TAG, "Statusbar service is not in Stopped state");
|
||||
}
|
||||
}
|
||||
|
||||
// Finalize
|
||||
|
||||
Reference in New Issue
Block a user