improve ota and version logging
This commit is contained in:
parent
f86a1b7c80
commit
a4c37c399e
@ -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()
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user