Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/devices/logitech_gpro_x2_lightspeed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ class LogitechGProX2Lightspeed : public protocols::LogitechCenturionProtocol {

bands.push_back(OnboardEqBand {
.frequency = descriptor->bands[i].frequency,
.gain_db = encodeGain(gain) });
.gain_db = encodeGain(gain),
.q_factor = descriptor->bands[i].q_factor });
}

if (auto write_result = writeOnboardEq(device_handle, *descriptor, bands); !write_result) {
Expand Down
6 changes: 3 additions & 3 deletions tests/test_protocols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2091,7 +2091,7 @@ void testCenturionProX2GraphicEqualizer()
dev.hid.replies.push_back(centurionFrame(PRO_X2_PREFIX, { 0x00, 0x01, 0x03, 0x00, 0x01 }));
queueBridgeReply(dev.hid, PRO_X2_PREFIX, 0x00, { 0x09, 0x00, 0x00 }); // Onboard EQ at index 9
queueBridgeReply(dev.hid, PRO_X2_PREFIX, 0x09, { 0x00, 0x00, 0x00, 0x00, 0x00 }); // EQ info
queueBridgeReply(dev.hid, PRO_X2_PREFIX, 0x09, hexBytes("00 05 00 50 00 01 00 f0 00 01 02 ee 00 01 08 98 00 01 19 c8 00 01")); // Slot 0 with five flat bands
queueBridgeReply(dev.hid, PRO_X2_PREFIX, 0x09, hexBytes("00 05 00 50 00 02 00 f0 00 01 02 ee 00 02 08 98 00 02 19 c8 00 01")); // Slot 0 with flat gains and mixed Q values
queueBridgeReply(dev.hid, PRO_X2_PREFIX, 0x09, {}); // EQ write reply

auto preset = dev.setEqualizerPreset(nullptr, 3); // Shooter
Expand All @@ -2101,11 +2101,11 @@ void testCenturionProX2GraphicEqualizer()
"Graphic EQ looks up the Onboard EQ feature directly");
assertFrame(dev.hid.writes[3], { 0x51, 0x09, 0x00, 0x03, 0x11, 0x00, 0x04, 0x00, 0x09, 0x11, 0x00 },
"Graphic EQ reads the band parameters from slot 0");
const auto expected_write_prefix = hexBytes("51 3d 01 03 11 01 00 00 09 21 00 05 00 50 ff 01 00 f0 ff 01 02 ee 04 01 08 98 03 01 19 c8 02 01");
const auto expected_write_prefix = hexBytes("51 3d 01 03 11 01 00 00 09 21 00 05 00 50 ff 02 00 f0 ff 01 02 ee 04 02 08 98 03 02 19 c8 02 01");
const auto& first_fragment = dev.hid.writes[4];
ASSERT_TRUE(first_fragment.size() >= expected_write_prefix.size()
&& std::equal(expected_write_prefix.begin(), expected_write_prefix.end(), first_fragment.begin()),
"Onboard EQ write retains all five frequencies, Shooter gains and fixed Q values");
"Onboard EQ write applies Shooter gains and preserves each band's frequency and Q");
ASSERT_TRUE(dev.hid.replies.empty(), "All replies consumed");

const auto info = dev.getEqualizerInfo();
Expand Down
Loading