From e2374ab40eeac4b6ac687923d4867f9f458c38ae Mon Sep 17 00:00:00 2001 From: nicola02nb <61830443+nicola02nb@users.noreply.github.com> Date: Thu, 4 Jul 2024 17:47:24 +0200 Subject: [PATCH] Fixed presets array lenght --- .gitignore | 1 + src/devices/steelseries_arctis_nova_7.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 43a75c3..4af754c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,6 @@ cmake-build-debug/ .vscode/* *.code-workspace +*.cache/ .DS_Store \ No newline at end of file diff --git a/src/devices/steelseries_arctis_nova_7.c b/src/devices/steelseries_arctis_nova_7.c index 14cd9a9..e204d81 100644 --- a/src/devices/steelseries_arctis_nova_7.c +++ b/src/devices/steelseries_arctis_nova_7.c @@ -31,10 +31,10 @@ static struct device device_arctis; static const uint16_t PRODUCT_IDS[] = { ID_ARCTIS_NOVA_7, ID_ARCTIS_NOVA_7x, ID_ARCTIS_NOVA_7x_v2, ID_ARCTIS_NOVA_7p, ID_ARCTIS_NOVA_7_DIABLO_IV }; -float flat[MSG_SIZE] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -float bass[MSG_SIZE] = { 3.5, 5.5, 4, 1, -1.5, -1.5, -1, -1, -1, -1 }; -float focus[MSG_SIZE] = { -5, -3.5, -1, -3.5, -2.5, 4, 6, -3.5, 0 }; -float smiley[MSG_SIZE] = { 3, 3.5, 1.5, -1.5, -4, -4, -2.5, 1.5, 3, 4 }; +float flat[EQUALIZER_BANDS_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +float bass[EQUALIZER_BANDS_COUNT] = { 3.5, 5.5, 4, 1, -1.5, -1.5, -1, -1, -1, -1 }; +float focus[EQUALIZER_BANDS_COUNT] = { -5, -3.5, -1, -3.5, -2.5, 4, 6, -3.5, 0 }; +float smiley[EQUALIZER_BANDS_COUNT] = { 3, 3.5, 1.5, -1.5, -4, -4, -2.5, 1.5, 3, 4 }; static EqualizerInfo EQUALIZER = { EQUALIZER_BANDS_COUNT, EQUALIZER_BASELINE, EQUALIZER_STEP, EQUALIZER_BAND_MIN, EQUALIZER_BAND_MAX }; static EqualizerPresets EQUALIZER_PRESETS = { @@ -235,6 +235,7 @@ static int arctis_nova_7_send_equalizer_preset(hid_device* device_handle, uint8_ return HSC_OUT_OF_BOUNDS; } } + return arctis_nova_7_send_equalizer(device_handle, &preset); }