Move chThdShouldTerminate to top of write loop.
Write partially filled buffer to file.

After terminating the write thread, write all encoded bytes to file so that all
Google protocol buffer messages are complete and decoding works properly.
Add bode plot from yaw rate error to yaw rate.
Fix minor comparison bug.
Fix minor bugs in Reset() and estimtor state saving.

Set point of rear wheel rate and yaw rate were being set to zero on the call to
Reset(), which is called whenever TurnOn() or TurnOff() is called, so it had
the effect of always having a set point of zero.
Continuous plant eigenvalue plot added.
Merge remote-tracking branch 'oliverlee/dev' into buffer_overflow_ol_dev

Conflicts:
	firmware/src/SampleBuffer.cpp
Change 'type' to 'type_'.
Remove unneeded commented out #include.
Merge remote-tracking branch 'oliverlee/dev' into buffer_overflow_ol_dev

Conflicts:
	plots/plot_data.py
Merge branch 'buffer_overflow_ol_dev'
Remove irrelevant shell script; update ignored files.
Updated ChibiOS-RT submodule.