feat: 灯光跟随屏幕内容。

feat: 灯光跟随屏幕内容。
This commit is contained in:
2022-11-24 23:21:46 +08:00
parent 1b10c6bea9
commit 56edd8ac77
7 changed files with 139 additions and 84 deletions

View File

@@ -2,7 +2,6 @@ use crate::picker::led_color::LedColor;
use super::mqtt::MqttConnection;
use once_cell::sync::OnceCell;
use paris::info;
pub struct Manager {
mqtt: MqttConnection,

View File

@@ -13,10 +13,10 @@ impl MqttConnection {
let mut options = MqttOptions::new("rumqtt-async", "192.168.31.11", 1883);
options.set_keep_alive(Duration::from_secs(5));
let (mut client, mut eventloop) = AsyncClient::new(options, 10);
let (client, mut eventloop) = AsyncClient::new(options, 10);
task::spawn(async move {
while let Ok(notification) = eventloop.poll().await {
println!("Received = {:?}", notification);
// println!("Received = {:?}", notification);
}
});
Self { client }