Emanuele Vicentini
Emanuele Vicentini
It should be the bootloader: assuming you're using the old optiboot version bundled with this code, it resets MCUSR before starting your code.
I think it's better if you ask in the more active fork: https://github.com/JChristensen/mighty-1284p Or you can compile and replace the bootloader: https://github.com/Optiboot/optiboot
Ok, then have a look at https://gist.github.com/baldowl/e6593d53f2454159571b I compiled the Optiboot's current master using the tool chain bundled in Arduino's IDE version 1.6.6, but, mind you, it doesn't matter so...
I think it's better if in an after filter you remove the key from session; something like (untested): ``` after do env['rack.session'].delete(Rack::Csrf.key) end ```
Nvm, scrap it: it would remove the token **before** Rack::Csrf had a chance to look at it.
YMMV, but yes, **I** would test at least the routes which are supposed to be protected with rack-test, just to avoid "surprises" down the road.
@IanBurry: if everything is behind Rack::Csrf, skipping it in test environment is a no brainer. However, if you wan to test it, you can follow a couple of different routes....
Fix those typos: `initUSART()`, not `initUsart()`; and `receiveByte()`, not `recieveByte()`.
See note on page 18 about Atmel Studio and the need to define `F_CPU` and `BAUD` at the project level.