use crate::{ config::{Button, ConfigError, DeviceConfig}, modules::{retrieve_module_from_name, start_module, HostEvent}, unwrap_or_error, }; use deck_driver as streamdeck; use hidapi::HidApi; use std::{collections::HashMap, fmt::Display, sync::Arc}; use streamdeck::{ asynchronous::{AsyncStreamDeck, ButtonStateUpdate}, info::Kind, StreamDeckError, }; use tokio::{ process::Command, runtime::Runtime, sync::mpsc::{self, error::TrySendError}, }; use tracing::{debug, error, info_span, trace}; /// A module controller in holding the information of a Module pub type ModuleController = (Arc