WellDone/MoMo-Firmware — pull request #66 by amcgee (2014-04-09 22:28:13+00:00)
Title: Implement Sensor API on the controller

This API allows sensor modules to push values to the controller. The values are then durably logged to Flash memory (a flash_queue ring buffer) This also refactors memory_manager, momo_config, and flash_queue to be better and utilize the persistent flashblock implementation.

Some implementation notes:
* The first subsection of the flash_queue is now reserved for a flashblock storing the ringbuffer pointers
* Currently, writing values and the flashbock to memory is done synchronously in the MIB callback - this should be asynchronous and probably utilize a small RAM buffer array (in sensor_manager.c).
* I have an adaptive reporting implementation (which aggregates intelligently based on verbosity settings and the actual data to be reported) but I'll put that in a separate pull request to (hopefully) not confuse things as much.
* Implementation of a sensor module registry (through module registrations) is still pending.
* I initially had a rudimentary "schedule value polling" implementation, but I decided it would be better to do a generic "schedule this callback every x interval" on the controller, and then have the module use the normal "push" API to record a value.
* I've added a python tool called `momosensor` which can:
* `log` individual values
* `readone` value, popping from the front of the values queue
* `emulate` to write a random value every .1 seconds.

Sorry this diff is so large.