Fixed card removal detection
Also switched from using seek command to select command with the reader.Select returns a result immediately, rather than seek which firstreturns an "in progress" error then later returns the card (as far as Ican tell).
Implemented code for new RFID readers
It's not fully working yet. When the checksum is enabled, it ignores allresponses. Also, it no longer recognizes a missing card.
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?
Adding program_tool script so we remember how to set tool id
Fixed another overflow bug and removed isqrt
Fixed timing in current sensing
The ADC interrupt didn't clear the TIFR timer interrupt flag, whichmeans the ADC wasn't triggered again on the next compare match.
Fixed overflow in current calculation
Switch ADC to timer 1 because timer 0 was taken. Oops.
Untested current RMS calculation
It's not actually RMS, it's variance. Same general idea.
Fixed annoying warnings about avr/signal.h
Moved tool address to Makefile
Added flushing before write to rfid reader
And other various fixes and changes, which I don't remember. Changedrfid reading to read every tick, but only try writing if enough tickshave passed.
Moved timing to time.c, and increased period of rfid polling
Added current sensing to toolbox
Tool stops waiting for access response if id is removed
Added tool state TS_DENY, with red LED until card is removed
Fixed timer error correction
Made rfid.c more robust against false negatives
Also changed LED code to be more generally usable, and changed mainboxto grant access to a particular user id instead of randomly choosing
Fixes. It tooltrons at a basic level now.
Added LED blinking, and other fixes
Fixed compile errors; finished converting char -> uint8_t
Eradicated use of signed chars in serial d'oh
Changed F_CPU to 8MHz instead of 1MHz
Added LED header, and some rfid debugging
Various fixes to tool main.c
- Input register callback no longer copies current_user to reg_buf prematurely, and then write the uninitialized serno into reg_buf (?!)- tool_disable was missing a ~- Updated coil read/write to use new 1 indexed addresses
Added RTS_ENABLE to Makefile
Also added UL to end of F_CPU
Fixed U2X1 being set in the wrong control register
Deleted accidently commited vim swap file
Fixed problem with high error in serial clock
Made some changes to the tool state machine
Added actual control of tool
Added capability to read/write coils to toolbox
Moved toolbox code into its own directory