Set old cloud 2 as always connected

This commit is contained in:
Lennard Kittner
2025-09-25 19:08:39 +02:00
parent ca60e021be
commit 3627f3d639

View File

@@ -53,11 +53,14 @@ pub struct CloudIIWireless {
impl CloudIIWireless { impl CloudIIWireless {
pub fn new_from_state(state: DeviceState) -> Self { pub fn new_from_state(state: DeviceState) -> Self {
CloudIIWireless { state } let mut tmp_state = state;
tmp_state.connected = Some(true);
CloudIIWireless { state: tmp_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(CloudIIWireless { state }) Ok(CloudIIWireless { state })
} }
} }