Project

General

Profile

Revision 36f3b65f

ID36f3b65f2d85009d64ab718036338dfd92e7835e
Parent 5305e5e7
Child 3e2fcd4e

Added by Thomas Mullins over 3 years ago

Removed rfid_restart flag

This way the AVR will always repoll the rfid reader after the timeout,
so hopefully it will never hang. Who knows?

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