1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 08:41:59 +00:00

Re-remove compilation_time_ from the app

This commit is contained in:
David Woodhouse
2025-12-15 23:23:46 +00:00
parent f5592595bc
commit 69fa5020d2
3 changed files with 2 additions and 10 deletions

View File

@@ -103,7 +103,7 @@ static const uint32_t TEARDOWN_TIMEOUT_REBOOT_MS = 1000; // 1 second for quick
class Application {
public:
void pre_setup(const std::string &name, const std::string &friendly_name, const char *comment,
const char *compilation_time, bool name_add_mac_suffix) {
bool name_add_mac_suffix) {
arch_init();
this->name_add_mac_suffix_ = name_add_mac_suffix;
if (name_add_mac_suffix) {
@@ -123,7 +123,6 @@ class Application {
this->friendly_name_ = friendly_name;
}
this->comment_ = comment;
this->compilation_time_ = compilation_time;
}
#ifdef USE_DEVICES
@@ -263,11 +262,6 @@ class Application {
bool is_name_add_mac_suffix_enabled() const { return this->name_add_mac_suffix_; }
/// deprecated: use get_build_time() or get_build_time_string() instead.
std::string get_compilation_time() const { return this->compilation_time_; }
/// Get the compilation time as StringRef (for API usage)
StringRef get_compilation_time_ref() const { return StringRef(this->compilation_time_); }
/// Size of buffer required for build time string (including null terminator)
static constexpr size_t BUILD_TIME_STR_SIZE = 26;
@@ -494,7 +488,6 @@ class Application {
// Pointer-sized members first
Component *current_component_{nullptr};
const char *comment_{nullptr};
const char *compilation_time_{nullptr};
// std::vector (3 pointers each: begin, end, capacity)
// Partitioned vector design for looping components

View File

@@ -501,7 +501,6 @@ async def to_code(config: ConfigType) -> None:
config[CONF_NAME],
config[CONF_FRIENDLY_NAME],
config.get(CONF_COMMENT, ""),
cg.RawExpression('__DATE__ ", " __TIME__'),
config[CONF_NAME_ADD_MAC_SUFFIX],
)
)

View File

@@ -12,7 +12,7 @@
using namespace esphome;
void setup() {
App.pre_setup("livingroom", "LivingRoom", "comment", __DATE__ ", " __TIME__, false);
App.pre_setup("livingroom", "LivingRoom", "comment", false);
auto *log = new logger::Logger(115200, 512); // NOLINT
log->pre_setup();
log->set_uart_selection(logger::UART_SELECTION_UART0);