From 80c3fecfcd89c5efe0f16feabe90a55ddfd25aaa Mon Sep 17 00:00:00 2001 From: Martin Rubli Date: Tue, 14 Mar 2023 11:13:50 +0100 Subject: [PATCH] libhidpp: hidpp20: Change LogitechInternal error to NotAllowed There has been some confusion about error value 5 but feature specs that refer to it generally use NOT_ALLOWED. Deprecate the LogitechInternal identifier but keep it around for now. --- src/libhidpp/hidpp20/Error.cpp | 4 ++-- src/libhidpp/hidpp20/Error.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libhidpp/hidpp20/Error.cpp b/src/libhidpp/hidpp20/Error.cpp index 5340637..98958ad 100644 --- a/src/libhidpp/hidpp20/Error.cpp +++ b/src/libhidpp/hidpp20/Error.cpp @@ -45,8 +45,8 @@ const char *Error::what () const noexcept return "Out of range"; case HWError: return "Hardware error"; - case LogitechInternal: - return "Logitech internal"; + case NotAllowed: + return "Not allowed"; case InvalidFeatureIndex: return "Invalid feature index"; case InvalidFunctionID: diff --git a/src/libhidpp/hidpp20/Error.h b/src/libhidpp/hidpp20/Error.h index 16b7e18..5c52c92 100644 --- a/src/libhidpp/hidpp20/Error.h +++ b/src/libhidpp/hidpp20/Error.h @@ -36,7 +36,8 @@ class Error: public std::exception InvalidArgument = 2, OutOfRange = 3, HWError = 4, - LogitechInternal = 5, + NotAllowed = 5, + LogitechInternal [[deprecated]] = NotAllowed, InvalidFeatureIndex = 6, InvalidFunctionID = 7, Busy = 8,