Revision 36f3b65f toolbox/main.c

View differences:

toolbox/main.c
266 266
}
267 267

  
268 268
int main() {
269
  char rfid_ticks = 0, rfid_restart = 0;
269
  char rfid_ticks = 0;
270 270

  
271 271
  time_init();
272 272
  led_init();
......
283 283
  while (1) {
284 284
    if (rfid_poll()) {
285 285
      rfid_get_serno(latest_reading);
286
      rfid_restart = 1;
287 286
    }
288
    if (++rfid_ticks >= RFID_PERIOD/TICK_MS && rfid_restart)
287
    if (++rfid_ticks >= RFID_PERIOD/TICK_MS)
289 288
    {
290 289
      rfid_ticks = 0;
291
      rfid_restart = 0;
292 290
      rfid_start_read();
293 291
    }
294 292
    current = current_read();

Also available in: Unified diff