diff --git a/src/main.rs b/src/main.rs index c2f2127..d84b857 100644 --- a/src/main.rs +++ b/src/main.rs @@ -88,6 +88,7 @@ enum Status<'a> { PreparingUpdate, Erasing, Writing { progress: u32 }, + Verifying, UpdateComplete, } @@ -492,7 +493,15 @@ async fn attempt_update( } debug!("Total size: {}", size); - updater.verify_and_mark_updated(PUBLIC_SIGNING_KEY, &signature, size).unwrap(); + let status = Status::Verifying.vec(); + client + .send_message(TOPIC_STATUS, &status, QualityOfService::QoS1, false) + .await + .unwrap(); + + updater + .verify_and_mark_updated(PUBLIC_SIGNING_KEY, &signature, size) + .unwrap(); // Update mqtt message should be send using retain // TODO: Clear the message