talking to the broker properly now
This commit is contained in:
@@ -17,6 +17,8 @@ use esp_wifi::{
|
||||
wifi::{ClientConfiguration, Configuration, WifiController, WifiDevice, WifiEvent, WifiState},
|
||||
};
|
||||
use log::info;
|
||||
use projekt_final::mqtt::client::mqtt_task;
|
||||
use defmt_rtt as _;
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
@@ -89,8 +91,8 @@ async fn main(spawner: Spawner) -> ! {
|
||||
Timer::after(Duration::from_millis(500)).await;
|
||||
}
|
||||
|
||||
// Stack is ready - Add rust-mqtt task here
|
||||
// spawner.spawn(mqtt_task(stack)).ok();
|
||||
spawner.spawn(mqtt_task(stack)).expect("failed to spawn MQTT task");
|
||||
info!("MQTT task started");
|
||||
|
||||
loop {
|
||||
Timer::after(Duration::from_secs(60)).await;
|
||||
|
||||
Reference in New Issue
Block a user