Skip to content

Commit

Permalink
Update tmpAgc comparison as per @softhack007.
Browse files Browse the repository at this point in the history
  • Loading branch information
atuline committed Mar 4, 2022
1 parent 575853d commit acedb18
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}
2 changes: 1 addition & 1 deletion wled00/audio_reactive.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void agcAvg() {

multAgc = (sampleAvg < 1) ? targetAgc : targetAgc / sampleAvg; // Make the multiplier so that sampleAvg * multiplier = setpoint
int tmpAgc = sample * multAgc;
if (tmpAgc > 255) tmpAgc = 0;
if (tmpAgc > 255) tmpAgc = 255;
sampleAgc = tmpAgc; // ONLY update sampleAgc ONCE because it's used elsewhere asynchronously!!!!
userVar0 = sampleAvg * 4;
if (userVar0 > 255) userVar0 = 255;
Expand Down

0 comments on commit acedb18

Please sign in to comment.