stuff
This commit is contained in:
@@ -830,7 +830,7 @@ async fn publish_firmware_info(
|
||||
let _ = esp.mqtt_publish("/firmware/last_online", timezone_time);
|
||||
let state = esp.get_ota_state();
|
||||
let _ = esp.mqtt_publish("/firmware/ota_state", &state).await;
|
||||
let slot = esp.get_ota_slot();
|
||||
let slot = esp.get_current_ota_slot();
|
||||
let _ = esp
|
||||
.mqtt_publish("/firmware/ota_slot", &format!("slot{slot}"))
|
||||
.await;
|
||||
@@ -1058,7 +1058,6 @@ async fn main(spawner: Spawner) -> ! {
|
||||
// intialize embassy
|
||||
logger::init_logger_from_env();
|
||||
//force init here!
|
||||
println!("Hal init");
|
||||
match BOARD_ACCESS.init(PlantHal::create().await.unwrap()) {
|
||||
Ok(_) => {}
|
||||
Err(_) => {
|
||||
@@ -1097,11 +1096,13 @@ async fn get_version(
|
||||
let hash = &env!("VERGEN_GIT_SHA")[0..8];
|
||||
|
||||
let board = board.board_hal.get_esp();
|
||||
let ota_slot = board.get_ota_slot();
|
||||
let ota_slot = board.get_current_ota_slot();
|
||||
let ota_state = board.get_ota_state();
|
||||
VersionInfo {
|
||||
git_hash: branch + "@" + hash,
|
||||
build_time: env!("VERGEN_BUILD_TIMESTAMP").to_owned(),
|
||||
partition: ota_slot,
|
||||
ota_state,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1110,4 +1111,5 @@ struct VersionInfo {
|
||||
git_hash: String,
|
||||
build_time: String,
|
||||
partition: String,
|
||||
ota_state: String,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user