Boot apps refactored (#498)
- Specify launcher via menuconfig - Specify auto-start app via menuconfig - Implement more rigid boot.properties fallbacks - Devices with tiny screen now auto-start ApWebServer - ApWebServer UI fixes
This commit is contained in:
committed by
GitHub
parent
49632d15c9
commit
8ff990d635
@@ -8,6 +8,7 @@
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <Tactility/settings/BootSettings.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <lvgl.h>
|
||||
|
||||
namespace tt::app::launcher {
|
||||
@@ -92,9 +93,22 @@ public:
|
||||
|
||||
void onCreate(AppContext& app) override {
|
||||
settings::BootSettings boot_properties;
|
||||
if (settings::loadBootSettings(boot_properties) && !boot_properties.autoStartAppId.empty()) {
|
||||
LOGGER.info("Starting {}", boot_properties.autoStartAppId);
|
||||
start(boot_properties.autoStartAppId);
|
||||
if (settings::loadBootSettings(boot_properties)) {
|
||||
if (
|
||||
!boot_properties.autoStartAppId.empty() &&
|
||||
findAppManifestById(boot_properties.autoStartAppId) != nullptr
|
||||
) {
|
||||
LOGGER.info("Starting {}", boot_properties.autoStartAppId);
|
||||
start(boot_properties.autoStartAppId);
|
||||
} else {
|
||||
LOGGER.info("No auto-start app configured. Skipping default auto-start due to boot.properties presence.");
|
||||
}
|
||||
} else if (
|
||||
strcmp(CONFIG_TT_AUTO_START_APP_ID, "") != 0 &&
|
||||
findAppManifestById(CONFIG_TT_AUTO_START_APP_ID) != nullptr
|
||||
) {
|
||||
LOGGER.info("Starting {}", CONFIG_TT_AUTO_START_APP_ID);
|
||||
start(CONFIG_TT_AUTO_START_APP_ID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user