Merge pull request #26 from jtanx/master

Fix segfault  & sensors bounds check + some documentation refactoring + work on unit tests
Automatic commit of irc logs
Merge pull request #27 from jtanx/master

Add further identification methods + some bugfixes
Automatic commit of irc logs
Add sensors, actuators, PWM code

Kept in separate files currently, can test and write proper function
once Beaglebone arrives
Automatic commit of irc logs
Fixed memory leaks
Fixed memory leaks
Merge pull request #29 from Callum-/master

fixed memory leaks
Added safety check mechanism (needs some work)
Simple safety check
Automatic commit of irc logs
Merge pull request #28 from justinjessada/master

Added sensors, actuators, PWM code
Merge pull request #30 from Callum-/master

safety check
Improve Server API for transferring sensor data

- Specify format as JSON, TSV or CSV: http://localhost/api/sensors?id=0&format=tsv
  - Default is JSON
  - Currently lower case; make case insensitive?

- Specify number of points (most recent) to transfer: http://localhost/api/sensors?id=0&points=all
  - Default is SENSOR_QUERYBUFSIZ (10)
  - "all" - Will transfer *all* points
  - Currently incompatable with the time seeking options (TODO: Make compatable?)

- Specify time range to return data points: http://localhost/api/sensors?id=0&start_time=5&end_time=6
  - Default behaviour is to just return most recent X points; see above
  - Currently no options for relative (eg: last 5s) time arguments (TODO: Include relative times?)\

Consider:
  - Remove critical sections by using one FILE* for writing and one for reading
    - A critical section is needed around every call to fseek, because the writing thread may write suddenly to the wrong position
    - Will having 2 FILE* mean file can be written and read independently?
      - Need to be sure that this is actually thread safe, otherwise it is more work for no reward
  - Need to simplify Sensor_Handler
    - Added some helper functions, but probably need more
  - Need to do some testing of this API in a test GUI
Add relative times, allow "points" param to work with "start_time"

Eg: To get a single point at a given time: http://localhost/api/sensors?id=0&start_time=5&points=1

The binary search means it will either get the closest point before or after the specified time.

Should probably make it so that FindTime will always get the same index given the same input.
Otherwise problems might arise.

Need some more argument checking?
Merge branch 'master' of https://github.com/szmoore/MCTX3420.git

Conflicts:
	server/sensor.c