]> www.fi.muni.cz Git - bike-lights.git/blobdiff - firmware/adc.c
Merge branch 'master' of ssh://anxur.fi.muni.cz/~kas/html/git/bike-lights
[bike-lights.git] / firmware / adc.c
index 5f7849fb1128ed47414f71fd1072dddab68e3e80..9155f325ccfd2c857a93c503b2c2f6337a78ad04 100644 (file)
@@ -35,7 +35,7 @@ static void inline setup_mux(unsigned char n)
                break;
        case 3: // ambient light: 1.1V, ADC5 (PA6), single-ended
                ADMUX = _BV(REFS1) | _BV(MUX2) | _BV(MUX0);
-               sum_shift = 0; // 1 measurement
+               sum_shift = 3; // 3 measurements
                break;
        case 4: // batt voltage: 1.1V, ADC6 (PA7), single-ended
                ADMUX = _BV(REFS1) | _BV(MUX2) | _BV(MUX1);