X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=firmware%2Fambient.c;h=aca12577fd1f4876549232b817e48eda534360f4;hb=5c760c1a89dc3692c8db2aeecd80b9d4421c3c35;hp=48a752d4b35bf744fcf11992684a2b1fef521e44;hpb=94524330d5709845fe0bbe8562fd68deedcb818c;p=bike-lights.git diff --git a/firmware/ambient.c b/firmware/ambient.c index 48a752d..aca1257 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[] = { - { 0x0000 , 0x0270< 0) + ambient_zone = byte_val - 1; + if (old_zone != ambient_zone) { #if 0 log_byte(0xab);