Added verifying status message
This commit is contained in:
parent
8ac6bbc7d8
commit
ef5cb2c876
11
src/main.rs
11
src/main.rs
|
@ -88,6 +88,7 @@ enum Status<'a> {
|
||||||
PreparingUpdate,
|
PreparingUpdate,
|
||||||
Erasing,
|
Erasing,
|
||||||
Writing { progress: u32 },
|
Writing { progress: u32 },
|
||||||
|
Verifying,
|
||||||
UpdateComplete,
|
UpdateComplete,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,7 +493,15 @@ async fn attempt_update<T, const MAX_PROPERTIES: usize, R, F>(
|
||||||
}
|
}
|
||||||
debug!("Total size: {}", size);
|
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
|
// Update mqtt message should be send using retain
|
||||||
// TODO: Clear the message
|
// TODO: Clear the message
|
||||||
|
|
Loading…
Reference in New Issue
Block a user