Revised plotting, fixed bug in closed loop tf.
Updated ChibiOS-RT
Polished i2c code for MPU6050, added error checks.

Removed mutexes from i2c code since only one thread access the i2c bus.

Added SystemState flags to aid in debugging of i2c errors.

Changed MPU6050 Acquire to log i2c error conditions and to halt the data
collection thread if it is not possible to initialized the MPU6050.

RearWheel now resets all data members to default values when Reset() is called.
Fixed bug in sign of applied current.
Moved current dir reading to after control update has occurred.
Fixed periodic halting.

Increased stack size of write and control threads.

Increased Sample buffer size from 128 to 256.

Decreased CH_TIME_QUANTUM from 20 to 2 to ensure that write thread can't run
for more than 2ms; this ensures the blocking nature of f_write doesn't screw
with the control timing.

Added names to control and write threads and changed the threads functions so
you can see the name.
Verified sign of steer torque.
Added pdf saving and quiet options to plot_scripts.py
Added checks to inputs of DARE.
Refactored controller, estimator and verified closed loop dynamics.
Fixed generation code, minor change in yaw rate controller
Add color to eigenvalue plots.

In controller and estimator eigenvalue plots, color eigenvalues by
forward speed of the system.

Signed-off-by: Dale Lukas Peterson <hazelnusse@gmail.com>
WIP: Major redesign of yaw rate controller.

This commit implements a LQR/LQG controller/estimator for the four bicycle
states. To be implemented next is a yaw rate PI controller as an outer loop so
that tracking yaw rate commands is possible.
Newline at end file.
Added Kp and Ki gains to ControllerGains.
PI yaw rate loop design and implementation complete.

This commit introduces a dependency on Matlab in order to tune the proportional
and integral gains that are used for tracking a yaw rate reference.

The design now has a LQR/LQG controller which stabilizes the bicycle; this is
the "inner loop".  The outer loop is the yaw rate PI control.

The controller gains are now static data of the YawRateController class.

Also implemented in this commit are settable speed thresholds to control at
what speed the estimator gets turned on and what speed the controller gets
turned on.  The estimation threshold should be at a rear wheel rate (forward
speed) that is greater (lower) than that of the control threshold.

Also settable is whether the outer PI loop is enabled.  If disabled, only the
LQR/LQG control will be used so set point tracking of yaw rate will have no
effect.
Updated ChibiOS-RT submodule.
Added nanopb as a submodule.
Added proto file, changed RearWheel to call Reset.

Eliminated redundant call to Reset() in SampleAndControl.cpp
Added nanopb to Makefile.