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:
@@ -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 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user