]> www.fi.muni.cz Git - bike-lights.git/commitdiff
5th brightness 2500 mA
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sat, 12 Apr 2014 20:22:32 +0000 (22:22 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sat, 12 Apr 2014 20:22:32 +0000 (22:22 +0200)
- use it in the daylight, and use brighter light in the night.

firmware/control.c
firmware/pwmled.c

index 2b1a7369f39f24e8b949e0d8e60aa73eb91d18fc..73f5e8ee02ee5ce7ce9ad5da593274dbdbc7f6b6 100644 (file)
@@ -224,9 +224,9 @@ void pwmled_select_brightness()
                brightness = PWMLED_BRIGHTNESS(0, 0, 0, 0, 0);
        } else if (ambient_zone == 0) {
                if (dim_mode)
-                       brightness = PWMLED_BRIGHTNESS(0, 1, 0, 0, 1);
+                       brightness = PWMLED_BRIGHTNESS(0, 1, 0, 0, 2);
                else
-                       brightness = PWMLED_BRIGHTNESS(1, 3, 2, 1, 3);
+                       brightness = PWMLED_BRIGHTNESS(1, 3, 2, 1, 4);
        } else if (ambient_zone == 1) {
                if (dim_mode)
                        brightness = PWMLED_BRIGHTNESS(0, 1, 0, 0, 1);
@@ -235,7 +235,7 @@ void pwmled_select_brightness()
        } else if (ambient_zone == 2) {
                brightness = PWMLED_BRIGHTNESS(1, 3, 2, 1, 3);
        } else if (ambient_zone == 3) {
-               brightness = PWMLED_BRIGHTNESS(2, 4, 2, 2, 4);
+               brightness = PWMLED_BRIGHTNESS(2, 4, 2, 2, 5);
        }
 
        pwmled_set_brightness(brightness);
index dd01b966d0e557138c0a3413ae1c589520cc1967..03d1adb5957df2711b6c7bedf11a9c696ccdec57 100644 (file)
@@ -84,6 +84,7 @@ static uint16_t adc_targets_2[] = {
        MA_GAIN_TO_ADC( 500,  1),
        MA_GAIN_TO_ADC( 700,  1),
        MA_GAIN_TO_ADC(1500,  1),
+       MA_GAIN_TO_ADC(2500,  1),
 #endif
 };