Fixes and updates

This commit is contained in:
Ken Van Hoeylandt 2025-08-21 22:25:32 +02:00
parent 57164ad6c8
commit d57b111f0e
6 changed files with 5 additions and 23 deletions

View File

@ -0,0 +1 @@
enableOnBoot=false

View File

@ -2,8 +2,6 @@
## Higher Priority
- Store encrypted WiFi credentials in `/data/app/wifi/x.ap.properties` (fixes problem with long SSIDs)
- Move WiFi settings from flash to `/data/apps/wifi/wifi.properties` (just the "start on boot")
- Move Development settings from flash to `/data/apps/development/development.properties` (just the "start on boot")
- Move Display settings from flash to `/data/apps/display/display.properties`
- App data directory should be automatically created (and then we can remove the custom code from Notes.cpp)

View File

@ -1,8 +1,10 @@
#include "Tactility/BootProperties.h"
#include <Tactility/LogEsp.h>
#include <Tactility/Log.h>
#include <Tactility/file/PropertiesFile.h>
#include <cassert>
namespace tt {
constexpr auto* TAG = "BootProperties";

View File

@ -5,7 +5,6 @@
#include <unordered_map>
#include <Tactility/file/File.h>
#include <sys/stat.h>
#define TAG "app"
@ -16,20 +15,12 @@ typedef std::unordered_map<std::string, std::shared_ptr<AppManifest>> AppManifes
static AppManifestMap app_manifest_map;
static Mutex hash_mutex(Mutex::Type::Normal);
void ensureAppPathsExist(const AppManifest& manifest) {
std::string path = "/data/app/" + manifest.id;
if (!file::findOrCreateDirectory(path, 0777)) {
TT_LOG_E(TAG, "Failed to create app directory: %s", path.c_str());
}
}
void addApp(const AppManifest& manifest) {
TT_LOG_I(TAG, "Registering manifest %s", manifest.id.c_str());
hash_mutex.lock();
if (!app_manifest_map.contains(manifest.id)) {
ensureAppPathsExist(manifest);
app_manifest_map[manifest.id] = std::make_shared<AppManifest>(manifest);
} else {
TT_LOG_E(TAG, "App id in use: %s", manifest.id.c_str());

View File

@ -6,9 +6,6 @@
#include <Tactility/Mutex.h>
#include <string>
#include <unordered_map>
#include <Tactility/app/AppInstance.h>
#include <Tactility/file/File.h>
namespace tt::service {
@ -23,12 +20,6 @@ static ServiceInstanceMap service_instance_map;
static Mutex manifest_mutex(Mutex::Type::Normal);
static Mutex instance_mutex(Mutex::Type::Normal);
void ensureServerPathsExist(const ServiceManifest& manifest) {
std::string path = "/data/service/" + manifest.id;
if (!file::findOrCreateDirectory(path, 0777)) {
TT_LOG_E(TAG, "Failed to create service directory: %s", path.c_str());
}
}
void addService(std::shared_ptr<const ServiceManifest> manifest, bool autoStart) {
assert(manifest != nullptr);
// We'll move the manifest pointer, but we'll need to id later
@ -38,7 +29,6 @@ void addService(std::shared_ptr<const ServiceManifest> manifest, bool autoStart)
manifest_mutex.lock();
if (service_manifest_map[id] == nullptr) {
ensureServerPathsExist(*manifest);
service_manifest_map[id] = std::move(manifest);
} else {
TT_LOG_E(TAG, "Service id in use: %s", id.c_str());

View File

@ -66,7 +66,7 @@ bool isScanning() {
return wifi->scan_active;
}
void connect(const settings::WifiApSettings* ap, bool remember) {
void connect(const settings::WifiApSettings& ap, bool remember) {
assert(wifi);
// TODO: implement
}