diff --git a/lib/devices/audeze_maxwell.hpp b/lib/devices/audeze_maxwell.hpp index 06cefab..0b70820 100644 --- a/lib/devices/audeze_maxwell.hpp +++ b/lib/devices/audeze_maxwell.hpp @@ -25,7 +25,7 @@ namespace headsetcontrol { * - Mic noise filter * * Special Requirements: - * - 15-packet initialization sequence followed by 6 status requests + * - 14-packet initialization sequence followed by 6 status requests * - 60ms delay between packets (official software sends at 52ms but 60ms is more reliable in testing) * - Uses hid_get_input_report for responses */ @@ -40,8 +40,8 @@ class AudezeMaxwell : public HIDDevice { static constexpr int REPORT_ID = 0x06; static constexpr int DELAY_US = 60000; // 60ms - // 15-packet initialization sequence - static constexpr std::array, 15> UNIQUE_REQUESTS { { { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x20 }, + // 14-packet initialization sequence + static constexpr std::array, 14> UNIQUE_REQUESTS { { { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x20 }, { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x25 }, { 0x06, 0x07, 0x80, 0x05, 0x5A, 0x03, 0x00, 0x07, 0x1C }, { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x28 }, @@ -54,7 +54,6 @@ class AudezeMaxwell : public HIDDevice { { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x83, 0x2C, 0x0B }, { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x24 }, { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x2F }, - { 0x06, 0x09, 0x80, 0x05, 0x5A, 0x05, 0x00, 0x00, 0x09, 0x25, 0x00, 0x7A }, { 0x06, 0x07, 0x80, 0x05, 0x5A, 0x03, 0x00, 0xD6, 0x0C } } }; // 6 packet status request sequence diff --git a/lib/devices/audeze_maxwell2.hpp b/lib/devices/audeze_maxwell2.hpp index 4c3b116..0a197f3 100644 --- a/lib/devices/audeze_maxwell2.hpp +++ b/lib/devices/audeze_maxwell2.hpp @@ -25,7 +25,7 @@ namespace headsetcontrol { * - Mic noise filter * * Special Requirements: - * - 15-packet initialization sequence followed by 6 status requests + * - 14-packet initialization sequence followed by 6 status requests * - 60ms delay between packets (official software sends at 52ms but 60ms is more reliable in testing) * - Uses hid_get_input_report for responses */ @@ -40,8 +40,8 @@ class AudezeMaxwell2 : public HIDDevice { static constexpr int REPORT_ID = 0x06; static constexpr int DELAY_US = 60000; // 60ms - // 15-packet initialization sequence - static constexpr std::array, 15> UNIQUE_REQUESTS { { { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x20 }, + // 14-packet initialization sequence + static constexpr std::array, 14> UNIQUE_REQUESTS { { { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x20 }, { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x25 }, { 0x06, 0x07, 0x80, 0x05, 0x5A, 0x03, 0x00, 0x07, 0x1C }, { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x28 }, @@ -54,7 +54,6 @@ class AudezeMaxwell2 : public HIDDevice { { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x83, 0x2C, 0x0B }, { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x24 }, { 0x06, 0x08, 0x80, 0x05, 0x5A, 0x04, 0x00, 0x01, 0x09, 0x2F }, - { 0x06, 0x09, 0x80, 0x05, 0x5A, 0x05, 0x00, 0x00, 0x09, 0x25, 0x00, 0x7A }, { 0x06, 0x07, 0x80, 0x05, 0x5A, 0x03, 0x00, 0xD6, 0x0C } } }; // 6 packet status request sequence @@ -153,8 +152,8 @@ class AudezeMaxwell2 : public HIDDevice { std::array, 6> status_buffs {}; // Send UNIQUE_REQUESTS packets - for (int i = 0; i < 15; ++i) { - auto result = sendGetInputReport(device_handle, UNIQUE_REQUESTS[i]); + for (const auto& unique_request : UNIQUE_REQUESTS) { + auto result = sendGetInputReport(device_handle, unique_request); if (!result) { return result.error(); }