From 7ff79f4e711c2d55daf667092cfce0289b1a7a9b Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Tue, 1 Sep 2020 22:28:45 -0400 Subject: add 1s write delay to driver --- common/rawaccel-error.hpp | 5 ----- common/rawaccel-io.hpp | 5 +---- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'common') diff --git a/common/rawaccel-error.hpp b/common/rawaccel-error.hpp index f5498f9..ecee526 100644 --- a/common/rawaccel-error.hpp +++ b/common/rawaccel-error.hpp @@ -21,9 +21,4 @@ namespace rawaccel { install_error() : io_error("rawaccel is not installed") {} }; - class cooldown_error : public io_error { - public: - cooldown_error() : io_error("write is on cooldown") {} - }; - } diff --git a/common/rawaccel-io.hpp b/common/rawaccel-io.hpp index 74e2d1e..e8641d1 100644 --- a/common/rawaccel-io.hpp +++ b/common/rawaccel-io.hpp @@ -74,10 +74,7 @@ namespace rawaccel { CloseHandle(ra_handle); if (!success) { - if (auto err = GetLastError(); err != ERROR_BUSY) { - throw std::system_error(err, std::system_category(), "DeviceIoControl failed"); - } - throw cooldown_error(); + throw std::system_error(GetLastError(), std::system_category(), "DeviceIoControl failed"); } } -- cgit v1.2.3