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,18 +1,16 @@
|
||||
#include "Tactility/TactilityCore.h"
|
||||
|
||||
#include "Tactility/app/AppContext.h"
|
||||
#include "Tactility/app/display/DisplaySettings.h"
|
||||
#include "Tactility/service/loader/Loader.h"
|
||||
#include "Tactility/lvgl/Style.h"
|
||||
|
||||
#include "Tactility/hal/display/DisplayDevice.h"
|
||||
#include <Tactility/TactilityCore.h>
|
||||
#include <Tactility/TactilityPrivate.h>
|
||||
#include <Tactility/app/AppContext.h>
|
||||
#include <Tactility/CpuAffinity.h>
|
||||
#include <Tactility/hal/display/DisplayDevice.h>
|
||||
#include <Tactility/hal/usb/Usb.h>
|
||||
#include <Tactility/kernel/SystemEvents.h>
|
||||
#include <Tactility/lvgl/Style.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <Tactility/settings/BootSettings.h>
|
||||
#include <Tactility/settings/DisplaySettings.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <Tactility/BootProperties.h>
|
||||
#include <Tactility/CpuAffinity.h>
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include "Tactility/app/crashdiagnostics/CrashDiagnostics.h"
|
||||
@@ -42,25 +40,25 @@ class BootApp : public App {
|
||||
static void setupDisplay() {
|
||||
const auto hal_display = getHalDisplay();
|
||||
assert(hal_display != nullptr);
|
||||
|
||||
settings::display::DisplaySettings settings;
|
||||
if (settings::display::load(settings)) {
|
||||
if (hal_display->getGammaCurveCount() > 0) {
|
||||
hal_display->setGammaCurve(settings.gammaCurve);
|
||||
TT_LOG_I(TAG, "Gamma curve %du", settings.gammaCurve);
|
||||
}
|
||||
} else {
|
||||
settings = settings::display::getDefault();
|
||||
}
|
||||
|
||||
if (hal_display->supportsBacklightDuty()) {
|
||||
uint8_t backlight_duty = 200;
|
||||
display::getBacklightDuty(backlight_duty);
|
||||
TT_LOG_I(TAG, "backlight %du", backlight_duty);
|
||||
hal_display->setBacklightDuty(backlight_duty);
|
||||
TT_LOG_I(TAG, "Backlight %du", settings.backlightDuty);
|
||||
hal_display->setBacklightDuty(settings.backlightDuty);
|
||||
} else {
|
||||
TT_LOG_I(TAG, "no backlight");
|
||||
}
|
||||
|
||||
if (hal_display->getGammaCurveCount() > 0) {
|
||||
uint8_t gamma_curve;
|
||||
if (display::getGammaCurve(gamma_curve)) {
|
||||
hal_display->setGammaCurve(gamma_curve);
|
||||
TT_LOG_I(TAG, "gamma %du", gamma_curve);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static bool setupUsbBootMode() {
|
||||
if (!hal::usb::isUsbBootMode()) {
|
||||
return false;
|
||||
@@ -107,8 +105,8 @@ class BootApp : public App {
|
||||
}
|
||||
#endif
|
||||
|
||||
BootProperties boot_properties;
|
||||
if (!loadBootProperties(boot_properties) || boot_properties.launcherAppId.empty()) {
|
||||
settings::BootSettings boot_properties;
|
||||
if (!settings::loadBootSettings(boot_properties) || boot_properties.launcherAppId.empty()) {
|
||||
TT_LOG_E(TAG, "Launcher not configured");
|
||||
stop();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user