Skip to content

Commit

Permalink
Fix oversight in LDR raw data filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
luebbe committed Feb 18, 2024
1 parent 79449c6 commit 301d694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PeripheryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ void PeripheryManager_::tick()
uint16_t LDRVALUE = analogRead(LDR_PIN);

// Send LDR values through median filter to get rid of the remaining spikes and then calculate the average
LDR_RAW = medianFilterLDR.AddValue(medianFilterLDR.AddValue(LDRVALUE));
LDR_RAW = meanFilterLDR.AddValue(medianFilterLDR.AddValue(LDRVALUE));
CURRENT_LUX = (roundf(photocell.getSmoothedLux() * 1000) / 1000);
if (AUTO_BRIGHTNESS && !MATRIX_OFF)
{
Expand Down

0 comments on commit 301d694

Please sign in to comment.