Revision 215b2fa6

View differences:

toolbox/led.c
46 46
  error += ERROR;
47 47
  if (error >= 1000) {
48 48
    error -= 1000;
49
    OCR0A = OCR+1;
49 50
  } else {
50
    ms++;
51
    if (ms == blink_period) {
52
      blink();
53
      if (blink_count == 0) {
54
        TCCR0B = 0;
55
      }
56
      ms = 0;
51
    OCR0A = OCR;
52
  }
53
  ms++;
54
  if (ms == blink_period) {
55
    blink();
56
    if (blink_count == 0) {
57
      TCCR0B = 0;
57 58
    }
59
    ms = 0;
58 60
  }
59 61
}
60 62

  

Also available in: Unified diff