improve ota and version logging

This commit is contained in:
Empire 2025-03-05 21:23:02 +01:00
parent f86a1b7c80
commit a4c37c399e

View File

@ -1081,15 +1081,15 @@ fn get_version() -> VersionInfo {
let running_partition = unsafe { esp_ota_get_running_partition() };
let address = unsafe { (*running_partition).address };
let partition = if address > 20000 {
"ota_1"
let partition = if address > 100000 {
"ota_1 @ "
} else {
"ota_0"
"ota_0 @ "
};
return VersionInfo {
git_hash: (branch + "@" + hash),
build_time: env!("VERGEN_BUILD_TIMESTAMP").to_owned(),
partition: partition.to_owned()
partition: partition.to_owned() + &address.to_string()
};
}