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
5 changes: 4 additions & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ jobs:
version: '18'
files-changed-only: true
lines-changed-only: false
thread-comments: 'update'
# Disable thread-comments to avoid 403 errors
# The commits comments API requires contents:write which is unsafe with pull_request_target
# Use step-summary and file-annotations for feedback instead
thread-comments: false
step-summary: true
file-annotations: true
extensions: 'c,cpp,h,hpp'
Expand Down
4 changes: 2 additions & 2 deletions lib/devices/steelseries_arctis_7_plus.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ class SteelSeriesArctis7Plus : public protocols::SteelSeriesNovaDevice<SteelSeri
int chat_raw = data[5];

// Map to normalized chatmix value (0-128, 64 = center)
int game = map(game_raw, 0, 0x64, 0, 64);
int chat = map(chat_raw, 0, 0x64, 0, -64);
int game = map(game_raw, 0, 0x64, 0, 64);
int chat = map(chat_raw, 0, 0x64, 0, -64);
int level = 64 - (chat + game);

// Calculate percentages
Expand Down
28 changes: 14 additions & 14 deletions lib/devices/steelseries_arctis_nova_3p_wireless.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ class SteelSeriesArctisNova3PWireless : public protocols::SteelSeriesNovaDevice<
| B(static_cast<int>(EqualizerFilterType::Notch));

return ParametricEqualizerInfo {
.bands_count = EQUALIZER_BANDS,
.gain_base = 0.0f,
.gain_step = EQUALIZER_GAIN_STEP,
.gain_min = EQUALIZER_GAIN_MIN,
.gain_max = EQUALIZER_GAIN_MAX,
.q_factor_min = EQUALIZER_Q_FACTOR_MIN,
.q_factor_max = EQUALIZER_Q_FACTOR_MAX,
.freq_min = EQUALIZER_FREQ_MIN,
.freq_max = EQUALIZER_FREQ_MAX,
.filter_types = supported_filters
.bands_count = EQUALIZER_BANDS,
.gain_base = 0.0f,
.gain_step = EQUALIZER_GAIN_STEP,
.gain_min = EQUALIZER_GAIN_MIN,
.gain_max = EQUALIZER_GAIN_MAX,
.q_factor_min = EQUALIZER_Q_FACTOR_MIN,
.q_factor_max = EQUALIZER_Q_FACTOR_MAX,
.freq_min = EQUALIZER_FREQ_MIN,
.freq_max = EQUALIZER_FREQ_MAX,
.filter_types = supported_filters
};
}

Expand Down Expand Up @@ -330,7 +330,7 @@ class SteelSeriesArctisNova3PWireless : public protocols::SteelSeriesNovaDevice<
}

// Each band: 2 bytes frequency (LE), 1 byte filter type, 1 byte gain, 2 bytes Q-factor (LE)
uint16_t freq = BAND_FREQUENCIES[i];
uint16_t freq = BAND_FREQUENCIES[i];
data[1 + 6 * i] = freq & 0xFF;
data[1 + 6 * i + 1] = (freq >> 8) & 0xFF;
data[1 + 6 * i + 2] = 0x01; // Peaking filter
Expand Down Expand Up @@ -382,7 +382,7 @@ class SteelSeriesArctisNova3PWireless : public protocols::SteelSeriesNovaDevice<
}

// Write frequency (LE)
uint16_t freq = static_cast<uint16_t>(band.frequency);
uint16_t freq = static_cast<uint16_t>(band.frequency);
data[1 + 6 * i] = freq & 0xFF;
data[1 + 6 * i + 1] = (freq >> 8) & 0xFF;

Expand All @@ -393,15 +393,15 @@ class SteelSeriesArctisNova3PWireless : public protocols::SteelSeriesNovaDevice<
data[1 + 6 * i + 3] = encodeGain(band.gain);

// Write Q-factor (LE)
uint16_t q = static_cast<uint16_t>(band.q_factor * 1000);
uint16_t q = static_cast<uint16_t>(band.q_factor * 1000);
data[1 + 6 * i + 4] = q & 0xFF;
data[1 + 6 * i + 5] = (q >> 8) & 0xFF;
}

// Fill remaining bands with disabled band
for (int i = settings.size(); i < EQUALIZER_BANDS; i++) {
// Disabled frequency
uint16_t freq = EQUALIZER_FREQ_DISABLED;
uint16_t freq = EQUALIZER_FREQ_DISABLED;
data[1 + 6 * i] = freq & 0xFF;
data[1 + 6 * i + 1] = (freq >> 8) & 0xFF;

Expand Down
32 changes: 16 additions & 16 deletions lib/devices/steelseries_arctis_nova_5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ class SteelSeriesArctisNova5 : public protocols::SteelSeriesNovaDevice<SteelSeri
| B(static_cast<int>(EqualizerFilterType::HighShelf));

return ParametricEqualizerInfo {
.bands_count = EQUALIZER_BANDS,
.gain_base = static_cast<float>(EQUALIZER_GAIN_BASE),
.gain_step = EQUALIZER_GAIN_STEP,
.gain_min = EQUALIZER_GAIN_MIN,
.gain_max = EQUALIZER_GAIN_MAX,
.q_factor_min = EQUALIZER_Q_FACTOR_MIN,
.q_factor_max = EQUALIZER_Q_FACTOR_MAX,
.freq_min = EQUALIZER_FREQ_MIN,
.freq_max = EQUALIZER_FREQ_MAX,
.filter_types = supported_filters
.bands_count = EQUALIZER_BANDS,
.gain_base = static_cast<float>(EQUALIZER_GAIN_BASE),
.gain_step = EQUALIZER_GAIN_STEP,
.gain_min = EQUALIZER_GAIN_MIN,
.gain_max = EQUALIZER_GAIN_MAX,
.q_factor_min = EQUALIZER_Q_FACTOR_MIN,
.q_factor_max = EQUALIZER_Q_FACTOR_MAX,
.freq_min = EQUALIZER_FREQ_MIN,
.freq_max = EQUALIZER_FREQ_MAX,
.filter_types = supported_filters
};
}

Expand Down Expand Up @@ -331,8 +331,8 @@ class SteelSeriesArctisNova5 : public protocols::SteelSeriesNovaDevice<SteelSeri
int chat_raw = data[6];

// Map to normalized chatmix value (0-128, 64 = center)
int game = map(game_raw, 0, 100, 0, 64);
int chat = map(chat_raw, 0, 100, 0, -64);
int game = map(game_raw, 0, 100, 0, 64);
int chat = map(chat_raw, 0, 100, 0, -64);
int level = 64 - (chat + game);

// Calculate percentages
Expand Down Expand Up @@ -408,7 +408,7 @@ class SteelSeriesArctisNova5 : public protocols::SteelSeriesNovaDevice<SteelSeri
}

// Each band: 2 bytes frequency (LE), 1 byte gain flag, 1 byte gain, 2 bytes Q-factor (LE)
uint16_t freq = BAND_FREQUENCIES[i];
uint16_t freq = BAND_FREQUENCIES[i];
data[2 + 6 * i] = freq & 0xFF; // Frequency low byte
data[2 + 6 * i + 1] = (freq >> 8) & 0xFF; // Frequency high byte
data[2 + 6 * i + 2] = gain_flag;
Expand Down Expand Up @@ -463,7 +463,7 @@ class SteelSeriesArctisNova5 : public protocols::SteelSeriesNovaDevice<SteelSeri
}

// Write frequency (LE)
uint16_t freq = static_cast<uint16_t>(band.frequency);
uint16_t freq = static_cast<uint16_t>(band.frequency);
data[2 + 6 * i] = freq & 0xFF;
data[2 + 6 * i + 1] = (freq >> 8) & 0xFF;

Expand All @@ -474,15 +474,15 @@ class SteelSeriesArctisNova5 : public protocols::SteelSeriesNovaDevice<SteelSeri
data[2 + 6 * i + 3] = static_cast<uint8_t>((band.gain + 10.0f) * 2.0f);

// Write Q-factor (LE)
uint16_t q = static_cast<uint16_t>(band.q_factor * 1000);
uint16_t q = static_cast<uint16_t>(band.q_factor * 1000);
data[2 + 6 * i + 4] = q & 0xFF;
data[2 + 6 * i + 5] = (q >> 8) & 0xFF;
}

// Fill remaining bands with disabled band
for (int i = settings.size(); i < EQUALIZER_BANDS; i++) {
// Disabled frequency
uint16_t freq = EQUALIZER_FREQ_DISABLED;
uint16_t freq = EQUALIZER_FREQ_DISABLED;
data[2 + 6 * i] = freq & 0xFF;
data[2 + 6 * i + 1] = (freq >> 8) & 0xFF;

Expand Down