Delete tt_time from TactilityKernel

This commit is contained in:
Ken Van Hoeylandt 2026-08-18 22:13:04 +02:00
parent 9299df004f
commit bede5f2aef
3 changed files with 0 additions and 90 deletions

View File

@ -1,42 +0,0 @@
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stddef.h>
#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

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),

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);
}
}