X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?p=bike-lights.git;a=blobdiff_plain;f=firmware%2Fambient.c;h=19b7a13cd86003bc4ec0407f9aa42ecbe287719d;hp=caeca14a242430923ffc1ec0dfe47e4cedf00459;hb=b235c2cde53066ab6afd280ccddacd866778c252;hpb=027218898e542b66566914ce787f4a0821b5f908 diff --git a/firmware/ambient.c b/firmware/ambient.c index caeca14..19b7a13 100644 --- a/firmware/ambient.c +++ b/firmware/ambient.c @@ -23,13 +23,12 @@ typedef struct { * Note: these have to be sorted, starting with 0, ending with 0xFFFF * and having small overlaps in order to provide a bit of hysteresis. */ -static ambient_zone_t ambient_zones[] = { +static ambient_zone_t ambient_zones[N_AMBIENT_ZONES] = { { 0x0000 , 0x0270< 0) + ambient_zone = byte_val - 1; + if (old_zone != ambient_zone) { #if 0 log_byte(0xab);