Update device timeouts

pull/64/head
Jonathan Schwartz 2023-12-01 23:29:42 +00:00 committed by Kyle Johannes
parent 3d2d3cb43d
commit 58f53edea8
1 changed files with 3 additions and 3 deletions

View File

@ -1112,7 +1112,7 @@ void Device::wiviThreadBody() {
if(!clearMasks.empty()) {
const auto clearMasksGenericResp = com->waitForMessageSync([this, &clearMasks]() {
return com->sendCommand(Command::WiVICommand, WiVI::CommandPacket::ClearUploads::Encode(clearMasks));
}, filter);
}, filter, std::chrono::milliseconds(1000));
if(!clearMasksGenericResp
|| 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
// first place)
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) {
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(
WiVI::SignalType::SleepRequest, remoteWakeup ? 0 : 2
));
}, filter);
}, filter, std::chrono::milliseconds(1000));
if(!generic || generic->type != Message::Type::WiVICommandResponse) {
report(APIEvent::Type::NoDeviceResponse, APIEvent::Severity::Error);