Updated embassy and locked rust version
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user