Merge Develop into Main (#300)

- Made an external app from internal Calculator app
- Update tactility.py to v1.2.0 (fix bug with selfupdate)
- Added warning to Development service UI
- Add context to `SECURITY.md`
- Split `ObjectFileReader` and `ObjectFileWriter` into separate cpp files
- Fix related to GPS config read errors
This commit is contained in:
Ken Van Hoeylandt
2025-08-02 12:28:28 +02:00
committed by GitHub
parent 982fce9207
commit 15f4fbfdc6
21 changed files with 1736 additions and 108 deletions
@@ -67,7 +67,7 @@ class DevelopmentApp final : public App {
if (ip.empty()) {
lv_label_set_text(statusLabel, "Waiting for IP...");
} else {
std::string status = std::string("Available at ") + ip;
const std::string status = std::string("Available at ") + ip;
lv_label_set_text(statusLabel, status.c_str());
}
}
@@ -134,6 +134,13 @@ public:
statusLabel = lv_label_create(wrapper);
lv_obj_align(statusLabel, LV_ALIGN_TOP_LEFT, 0, 50);
auto warning_label = lv_label_create(wrapper);
lv_label_set_text(warning_label, "This feature is experimental and uses an unsecured http connection.");
lv_obj_set_width(warning_label, LV_PCT(100));
lv_label_set_long_mode(warning_label, LV_LABEL_LONG_WRAP);
lv_obj_set_style_text_color(warning_label, lv_color_make(0xff, 0xff, 00), LV_STATE_DEFAULT);
lv_obj_align(warning_label, LV_ALIGN_TOP_LEFT, 0, 80);
updateViewState();
timer.start(1000);
@@ -2,6 +2,7 @@
#include <Tactility/file/ObjectFile.h>
#include <cstring>
#include <unistd.h>
using tt::hal::gps::GpsDevice;
@@ -30,6 +31,13 @@ bool GpsService::getGpsConfigurations(std::vector<hal::gps::GpsConfiguration>& c
return false;
}
// If file does not exist, return empty list
if (access(path.c_str(), F_OK) != 0) {
TT_LOG_W(TAG, "No configurations (file not found: %s)", path.c_str());
return true;
}
TT_LOG_I(TAG, "Reading configuration file %s", path.c_str());
auto reader = file::ObjectFileReader(path, sizeof(hal::gps::GpsConfiguration));
if (!reader.open()) {
TT_LOG_E(TAG, "Failed to open configuration file");