Updated embassy and locked rust version

This commit is contained in:
2024-03-27 02:50:08 +01:00
parent a81c17cbb1
commit 719723565f
6 changed files with 370 additions and 292 deletions

View File

@@ -1,6 +1,5 @@
#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
#![feature(never_type)]
use defmt::*;
@@ -22,7 +21,7 @@ use rust_mqtt::{
packet::v5::publish_packet::QualityOfService,
};
use serde::Serialize;
use static_cell::make_static;
use static_cell::StaticCell;
mod error;
@@ -63,7 +62,7 @@ where
topic_status: &'static str,
version: &'static str,
public_key: &'static [u8],
public_key: &'static [u8; 32],
}
impl<'a, DFU, STATE> Updater<'a, DFU, STATE>
@@ -77,7 +76,7 @@ where
updater: BlockingFirmwareUpdater<'a, DFU, STATE>,
topic_status: &'static str,
version: &'static str,
public_key: &'static [u8],
public_key: &'static [u8; 32],
) -> Self {
Self {
updater,
@@ -92,7 +91,8 @@ where
&self,
config: &mut ClientConfig<'_, MAX_PROPERTIES, impl RngCore>,
) {
let msg = make_static!(Status::Disconnected.json());
static MSG: StaticCell<Vec<u8, 512>> = StaticCell::new();
let msg = MSG.init(Status::Disconnected.json());
config.add_will(self.topic_status, msg, true);
}