From bede5f2aef61103d646b929e387c8ab5e4c19917 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Tue, 18 Aug 2026 22:13:04 +0200 Subject: [PATCH] Delete tt_time from TactilityKernel --- TactilityC/Include/tt_time.h | 42 ----------------------------------- TactilityC/Source/tt_init.cpp | 6 ----- TactilityC/Source/tt_time.cpp | 42 ----------------------------------- 3 files changed, 90 deletions(-) delete mode 100644 TactilityC/Include/tt_time.h delete mode 100644 TactilityC/Source/tt_time.cpp diff --git a/TactilityC/Include/tt_time.h b/TactilityC/Include/tt_time.h deleted file mode 100644 index db9f972d3..000000000 --- a/TactilityC/Include/tt_time.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#define TT_TIMEZONE_NAME_BUFFER_LENGTH 32 -#define TT_TIMEZONE_CODE_BUFFER_LENGTH 48 - -/** - * Set the timezone - * @param[in] name human-readable name - * @param[in] code the technical code (from timezones.csv) - */ -void tt_timezone_set(const char* name, const char* code); - -/** - * Get the name of the timezone - * @param[out] buffer the output buffer which will include a null terminator (should be TT_TIMEZONE_NAME_BUFFER_LENGTH) - * @param[in] bufferSize the size of the output buffer - */ -bool tt_timezone_get_name(char* buffer, size_t bufferSize); - -/** - * Get the code of the timezone (see timezones.csv) - */ -bool tt_timezone_get_code(char* buffer, size_t bufferSize); - -/** @return true when clocks should be shown as a 24 hours one instead of 12 hours */ -bool tt_timezone_is_format_24_hour(); - -/** Set whether clocks should be shown as a 24 hours instead of 12 hours - * @param[in] show24Hour - */ -void tt_timezone_set_format_24_hour(bool show24Hour); - -#ifdef __cplusplus -} -#endif diff --git a/TactilityC/Source/tt_init.cpp b/TactilityC/Source/tt_init.cpp index 3a1007d57..533d057ee 100644 --- a/TactilityC/Source/tt_init.cpp +++ b/TactilityC/Source/tt_init.cpp @@ -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), diff --git a/TactilityC/Source/tt_time.cpp b/TactilityC/Source/tt_time.cpp deleted file mode 100644 index ee97242be..000000000 --- a/TactilityC/Source/tt_time.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "tt_time.h" - -#include -#include - -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); -} - -}