X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=firmware%2Fbattery.c;h=4763f0563334f99423d99a6e2f9893cabe034a27;hb=6d9e2053eb39ebbe70df69c1faf3384ac2aa99fa;hp=192acf04e40502fd3097ed2425ee9c8288bc0d31;hpb=60d17ce8b779c966e6285f1fb9f3de3118752092;p=bike-lights.git diff --git a/firmware/battery.c b/firmware/battery.c index 192acf0..4763f05 100644 --- a/firmware/battery.c +++ b/firmware/battery.c @@ -112,8 +112,12 @@ unsigned char battery_gauge() rv = 10; } - if (rv == 1) - battery_critical = 1; +#if 0 + if (battery_adcval && rv == 1) + err_flags.err_battery = 1; + else + err_flags.err_battery = 0; +#endif #if 0 log_byte(0xbb);