Fixes and improvements (#617)

This commit is contained in:
Ken Van Hoeylandt
2026-08-20 17:22:01 +02:00
committed by GitHub
parent b03759a111
commit 0ff1627385
38 changed files with 309 additions and 342 deletions
-6
View File
@@ -3,7 +3,6 @@
#include "tt_app_alertdialog.h"
#include "tt_app_fileselection.h"
#include "tt_app_selectiondialog.h"
#include "tt_time.h"
#include "symbols/cplusplus.h"
#include "symbols/esp_event.h"
@@ -276,11 +275,6 @@ const esp_elfsym main_symbols[] {
ESP_ELFSYM_EXPORT(tt_app_fileselection_get_result_path),
ESP_ELFSYM_EXPORT(tt_app_selectiondialog_start),
ESP_ELFSYM_EXPORT(tt_app_alertdialog_start),
ESP_ELFSYM_EXPORT(tt_timezone_set),
ESP_ELFSYM_EXPORT(tt_timezone_get_name),
ESP_ELFSYM_EXPORT(tt_timezone_get_code),
ESP_ELFSYM_EXPORT(tt_timezone_is_format_24_hour),
ESP_ELFSYM_EXPORT(tt_timezone_set_format_24_hour),
// stdio.h
ESP_ELFSYM_EXPORT(rename),
-42
View File
@@ -1,42 +0,0 @@
#include "tt_time.h"
#include <Tactility/settings/Time.h>
#include <cstring>
using namespace tt;
extern "C" {
void tt_timezone_set(const char* name, const char* code) {
settings::setTimeZone(name, code);
}
bool tt_timezone_get_name(char* buffer, size_t bufferSize) {
auto name = settings::getTimeZoneName();
if (bufferSize < (name.length() + 1)) {
return false;
} else {
strcpy(buffer, name.c_str());
return true;
}
}
bool tt_timezone_get_code(char* buffer, size_t bufferSize) {
auto code = settings::getTimeZoneCode();
if (bufferSize < (code.length() + 1)) {
return false;
} else {
strcpy(buffer, code.c_str());
return true;
}
}
bool tt_timezone_is_format_24_hour() {
return settings::isTimeFormat24Hour();
}
void tt_timezone_set_format_24_hour(bool show24Hour) {
return settings::setTimeFormat24Hour(show24Hour);
}
}