Update device timeouts
parent
3d2d3cb43d
commit
58f53edea8
|
|
@ -1112,7 +1112,7 @@ void Device::wiviThreadBody() {
|
||||||
if(!clearMasks.empty()) {
|
if(!clearMasks.empty()) {
|
||||||
const auto clearMasksGenericResp = com->waitForMessageSync([this, &clearMasks]() {
|
const auto clearMasksGenericResp = com->waitForMessageSync([this, &clearMasks]() {
|
||||||
return com->sendCommand(Command::WiVICommand, WiVI::CommandPacket::ClearUploads::Encode(clearMasks));
|
return com->sendCommand(Command::WiVICommand, WiVI::CommandPacket::ClearUploads::Encode(clearMasks));
|
||||||
}, filter);
|
}, filter, std::chrono::milliseconds(1000));
|
||||||
|
|
||||||
if(!clearMasksGenericResp
|
if(!clearMasksGenericResp
|
||||||
|| clearMasksGenericResp->type != Message::Type::WiVICommandResponse
|
|| clearMasksGenericResp->type != Message::Type::WiVICommandResponse
|
||||||
|
|
@ -1262,7 +1262,7 @@ std::optional<bool> Device::isSleepRequested() const {
|
||||||
// will be suppressed (assuming the device supported it in the
|
// will be suppressed (assuming the device supported it in the
|
||||||
// first place)
|
// first place)
|
||||||
return com->sendCommand(Command::WiVICommand, WiVI::CommandPacket::GetSignal::Encode(WiVI::SignalType::SleepRequest));
|
return com->sendCommand(Command::WiVICommand, WiVI::CommandPacket::GetSignal::Encode(WiVI::SignalType::SleepRequest));
|
||||||
}, filter);
|
}, filter, std::chrono::milliseconds(1000));
|
||||||
|
|
||||||
if(!generic || generic->type != Message::Type::WiVICommandResponse) {
|
if(!generic || generic->type != Message::Type::WiVICommandResponse) {
|
||||||
report(APIEvent::Type::NoDeviceResponse, APIEvent::Severity::Error);
|
report(APIEvent::Type::NoDeviceResponse, APIEvent::Severity::Error);
|
||||||
|
|
@ -1301,7 +1301,7 @@ bool Device::allowSleep(bool remoteWakeup) {
|
||||||
return com->sendCommand(Command::WiVICommand, WiVI::CommandPacket::SetSignal::Encode(
|
return com->sendCommand(Command::WiVICommand, WiVI::CommandPacket::SetSignal::Encode(
|
||||||
WiVI::SignalType::SleepRequest, remoteWakeup ? 0 : 2
|
WiVI::SignalType::SleepRequest, remoteWakeup ? 0 : 2
|
||||||
));
|
));
|
||||||
}, filter);
|
}, filter, std::chrono::milliseconds(1000));
|
||||||
|
|
||||||
if(!generic || generic->type != Message::Type::WiVICommandResponse) {
|
if(!generic || generic->type != Message::Type::WiVICommandResponse) {
|
||||||
report(APIEvent::Type::NoDeviceResponse, APIEvent::Severity::Error);
|
report(APIEvent::Type::NoDeviceResponse, APIEvent::Severity::Error);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue