]> www.fi.muni.cz Git - bike-lights.git/blobdiff - firmware/ambient.c
firmware: control logic moved to a separate module
[bike-lights.git] / firmware / ambient.c
index ffe7740f7c1b4d4644d6c45763d910fffb5752bb..025b0c4bd6dcb6839395a36f91a8fedd4dc97e73 100644 (file)
@@ -11,7 +11,7 @@ static uint16_t ambient_zones[] = {
 };
 #define N_AMBIENT_ZONES (sizeof(ambient_zones)/sizeof(ambient_zones[0]))
 
-void ambient_init()
+void init_ambient()
 {
        ambient_val = 0;
        ambient_zone = 0;
@@ -24,6 +24,8 @@ void ambient_zone_changed()
        log_byte(ambient_zone);
        log_word(ambient_val);
        log_flush();
+
+       pattern_reload();
 }
 
 void ambient_adc(uint16_t adcval)