Connect cloud II by default since the get_wireless_connected_status_packet resets state and should therefore not be used

This commit is contained in:
Lennard Kittner
2026-02-20 16:10:23 +01:00
parent 7fbbb65cb5
commit d244e189a7

View File

@@ -48,11 +48,14 @@ pub struct CloudIIWirelessDTS {
impl CloudIIWirelessDTS { impl CloudIIWirelessDTS {
pub fn new_from_state(state: DeviceState) -> Self { pub fn new_from_state(state: DeviceState) -> Self {
let mut state = state;
state.connected = Some(true);
CloudIIWirelessDTS { state } CloudIIWirelessDTS { state }
} }
pub fn new() -> Result<Self, DeviceError> { pub fn new() -> Result<Self, DeviceError> {
let state = DeviceState::new(&PRODUCT_IDS, &VENDOR_IDS)?; let mut state = DeviceState::new(&PRODUCT_IDS, &VENDOR_IDS)?;
state.connected = Some(true);
Ok(CloudIIWirelessDTS { state }) Ok(CloudIIWirelessDTS { state })
} }
} }