...

Squashed commit of the following:

commit a93ef1206681987685f4d4efc565a7751dc941b2
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri May 17 20:47:52 2013 +0100

    incorreclt dealing with unsigned bytes

commit 1c38d800368c5465e869454b3a90e7cc9151f7db
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri May 17 20:06:22 2013 +0100

    sync with jformica

commit cb591a35ab94121f8598557fe42847797436df9a
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri May 17 17:45:43 2013 +0100

    channelid getters

commit c49b35d0e210cba0d936d1a23207f0d6f9548b21
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu May 16 19:02:55 2013 +0100

    clean

commit 8a5eff8bc43fec674770b9ea83460b7cbfbd5510
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu May 16 19:01:52 2013 +0100

    ...

commit ba184e81f6b6fda6aeff5d4fd8822addb3b68ff3
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu May 16 19:00:33 2013 +0100

    gitignore

commit b7e1a0e7312ec13a342b2b546d4d464c0ed266ea
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu May 16 18:31:54 2013 +0100

    changes from last commit

commit dcbf6274ca9526053613b9c931a339b47a4dfb44
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu May 16 13:16:56 2013 +0100

    ...

commit afe99cf0584864a002aebc9836c675cd4745f751
Merge: b9221b7 c68d2e2
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Apr 15 19:43:21 2013 +0100

    Merge branch 'SPRMapper' of https://github.com/cowboy-coders/CyclismoProject into unstable

commit c68d2e242b3eca41823a04f915c95e7340700033
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Sun Apr 14 14:18:51 2013 +0100

    Minor tidyup

commit 14d0ad9f0e150829775f611255374ba229a9d402
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Sun Apr 14 13:58:07 2013 +0100

    Added Speed, power, resistance surface fitting and calibration tool
    (Python)

commit d2eda79474ef157c860d1333742bb9f50f593109
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Sat Apr 13 19:36:59 2013 +0100

    Updated SPR Mapper tests.

commit 5b6d9963ef6537bae4483366528f5a7adcc1821c
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Sat Apr 13 19:35:32 2013 +0100

    Updated surface coeffs. for SPR mapper and added bounded resistance.
    Updated tests. Seems to behave reasonably, but possibly some problems at
    slow speed and high power.

commit b9221b7e1ac6f13aad09fcaa7346d9b9b2d70220
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Apr 11 02:51:01 2013 +0100

    Added csv logging utility functions to AbstractController. Removes some unsightly nesting and facilitates code reuse.

commit ec8ce1cfe0041a3a23c5482875cd33256f4a3ab7
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Apr 11 01:03:11 2013 +0100

    DeelteOneTrack was closing app

commit abfd275d8e89f9397f6c13a9635a0424b966b49e
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Wed Apr 10 21:27:12 2013 +0100

    Updated Speed, resistance, (power) models and tests

commit 07ac14c39211745362614fe2f65d638d8a65af4a
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Apr 10 19:48:01 2013 +0100

    Make dougs new class compile with recent changes

commit 31bd9b0fb39a3654dcc5816e9c0eb679b8a5a834
Merge: eb100e6 f8d78c5
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Apr 10 19:44:18 2013 +0100

    Merge branch 'doug-unstable' into unstable

commit eb100e69f56aba47fcbae6eb9efc2a94e4eb5c2d
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Apr 10 19:40:44 2013 +0100

    Converted to hooks. Compiles, but does it work?

commit a20a0bf7b70ffc4d6791121eb8f0b5aa07942b21
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Apr 10 19:25:55 2013 +0100

    pre change abstract controller to use hooks

commit a0dfdd748848f53fe620b0f4eb9c1034b5e7ae25
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Apr 10 15:14:30 2013 +0100

    Calibration working. Going to change to state machine so we can detect unexpected rrors which may indicate an error has occured.

commit f8d78c5521f59a98734ac46bd49f9ce3b19f3a0f
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Mon Apr 8 22:02:51 2013 +0100

    Added prototype speed power resistance mapper based on calibration data

commit 3467bb48812d9459bc67948cbe1bca57c45c6d04
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Mon Apr 8 21:47:18 2013 +0100

    Fixed test with new data model

commit d0b8640f5a85be53d7b2a645a43f2637b6272151
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Mon Apr 8 21:38:11 2013 +0100

    Added (now broken) test to fix

commit b517e9eb2ab746d1d5575c5fe8c97c78a40d5f90
Author: Will Szumski <will@cowboycoders.org>
Date:   Tue Apr 2 22:38:13 2013 +0100

    Fixed Brake Model lower resistance to 250 as testing showed a dead region

commit e4ee3ebaa42098b91835f4772006349adec536fa
Author: Will Szumski <will@cowboycoders.org>
Date:   Tue Apr 2 20:49:59 2013 +0100

    AbstractController refactor start to call onStart() hook

commit 20db6264dd8570252032ab23bb531b03dcd7c929
Author: Will Szumski <will@cowboycoders.org>
Date:   Tue Apr 2 17:17:01 2013 +0100

    Constant Resistance Controller

commit fde8adc0456537b859735d15c2687c0ac6d711f6
Author: Will Szumski <will@cowboycoders.org>
Date:   Tue Apr 2 16:39:24 2013 +0100

    SpeedSlopeMapper working

commit 61678d76b7cbb27bffe475d1a8baffc90a4c980a
Merge: a2b29f3 9655edf
Author: Will Szumski <will@cowboycoders.org>
Date:   Tue Apr 2 01:20:59 2013 +0100

    Merge branch 'powermodel' into unstable

commit a2b29f3f443e78121ecae32fd2b6b1a2e9870479
Author: Will Szumski <will@cowboycoders.org>
Date:   Tue Apr 2 01:11:50 2013 +0100

    Settings now cleared when no stored values are found

commit 9655edfe04f801331310455071fb46cc2db1b70e
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Tue Apr 2 01:09:10 2013 +0100

    Fixed refactoring errors

commit ef1ee1ac91ef7d6b9c4125486da3b02903c307c0
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Tue Apr 2 00:53:32 2013 +0100

    Fixed typo

commit d1a9b393533ecd0bdde41e09260f80c8c431d2c7
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Tue Apr 2 00:29:49 2013 +0100

    Refactored head unit and brake models into a shared model

commit 741eb8d44657729d8314c78f9fbe8101f2c04f12
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Apr 1 20:50:01 2013 +0100

    Gradient Corrected Distance in course tracker

commit c0bf62e0d33692870b327f6644eef9c70dc9891f
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Mon Apr 1 20:39:40 2013 +0100

    Added some comments and cleaned up some magic numbers

commit 4dae341de8c341c42c6531f16703679962aa5bad
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Mon Apr 1 19:36:40 2013 +0100

    Resistance is now set at sub-second intervals to ensure most recent
    update is available for sending the brake.

commit 66b20ad797f85ec17661134a84b4d820303829a0
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Mon Apr 1 19:20:27 2013 +0100

    Added a brake controller which maps brake resistance and virtual speed
    via a polynomial fit obtained from observations of the head unit.

commit 373ea9570980d01476e3b466e449d6d6cfe1fc47
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Apr 1 17:26:30 2013 +0100

    fixed a few little bugs

commit 78a38c9f9f35c2d555885c710c350535c85a6dc2
Author: Will Szumski <will@cowboycoders.org>
Date:   Sat Mar 30 20:02:44 2013 +0000

    order bikes by name

commit 55b654e945db72ef14368440d6ad0f082cf47f57
Author: Will Szumski <will@cowboycoders.org>
Date:   Sat Mar 30 19:55:15 2013 +0000

    Save/restore settings in/from database

commit 5314625a8f0f76e460759122d10597fb249e4d77
Author: Will Szumski <will@cowboycoders.org>
Date:   Sat Mar 30 18:05:19 2013 +0000

    long time no commit

commit d0ea40af462f96557c3fdeffdb0a4dade0fdb67b
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Mar 14 03:29:17 2013 +0000

    Users hooked up, just need to send weight to turbo trainer

commit ef01334f5c719d9fec8339fea9901cb50ba6b4f4
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Mar 6 17:51:15 2013 +0000

    still adding users ..

commit a1d75bcb6e6f8a6985ceda03517f52f07988900b
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri Mar 1 23:52:38 2013 +0000

    Refactored turbotrainer interface

commit 882e6bc74bb069181b34400ff080a863929efc0f
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Feb 27 02:29:52 2013 +0000

    Extracting virtualspeed curves

commit c8a208029bda2265a2b6dd98dc78ccc4e03db44c
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Feb 27 02:28:54 2013 +0000

    Bit of tidying

commit 275342758e7856e759061c2e83f37881447f8810
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Feb 27 02:27:49 2013 +0000

    Deal with multiple syncs in received messages / hopefully improved robustness

commit 0cf47b7679e7f1417e7f9481b15f7f6520700178
Author: Will Szumski <will@cowboycoders.org>
Date:   Sat Feb 23 17:52:02 2013 +0000

    Sync to wheel speed at estimated resistance before switching to pid control

commit 01f70db92a67b311ba6fb8a2997e36694077d959
Author: Will Szumski <will@cowboycoders.org>
Date:   Sat Feb 23 12:00:58 2013 +0000

    assorted

commit 89820de09545a03986eeff3174c00da98076f706
Author: Will Szumski <will@cowboycoders.org>
Date:   Sat Feb 23 12:00:25 2013 +0000

    Removed apks /resources.ap_

commit a515792fc310844eb3ad41db01595769ab4dedad
Author: Will Szumski <will@cowboycoders.org>
Date:   Sat Feb 23 11:42:25 2013 +0000

    remove old classes

commit 13eacb435f63293685410faae17578735a43e8e6
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri Feb 22 20:02:31 2013 +0000

    Was notifying listener instead of model. This is why it was so slow waiting for the distance to be reset and why I had to bodge that ErrorProneCall in the android code - madness!

commit a0e8f7137a32af7e12308dd9b38403e50704a540
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri Feb 22 19:52:09 2013 +0000

    ChainedCOnidtions returns true ir retested after all conditions have been exhausted

commit e0c2ab5b38427f6a64095bee357dad8e0c904b4f
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri Feb 22 18:49:30 2013 +0000

    -Improved receipt
    -MessageSender's must now return a list of messages sent
    -removed sendAndWaitForAck : use sendAndWaitForMessage
    -simplified eventmachine
    -no longer buffer previously received messages : use a chainedCondition if you need to wait for multiple conditions

commit d37604c7dfc1c74a99b159e7dbcae8c120fd3068
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri Feb 22 18:22:50 2013 +0000

    Reworking receipt - removing abstract message sender

commit 240f797cdc234abcff3f39d67b74e7024d030ef9
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri Feb 22 17:01:20 2013 +0000

    Renamed MessageDecoratable

commit 710438367946e20bfd015e69ec074265a05dbff2
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri Feb 22 03:29:53 2013 +0000

    Made a slow Averager / going to reimplement without running total (faster in a quick benchmark)

commit 5aac22f106a36cb868ad1a3209c36c816af1ef9b
Author: Will Szumski <will@cowboycoders.org>
Date:   Fri Feb 22 02:10:27 2013 +0000

    Refactored FixedSizeBuffer

commit df752999df76226329c34c95a7f39caaca8bdd47
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Feb 21 16:06:59 2013 +0000

    Switch pv and setpoint when calculating error

commit e4b2861b1f1b1cc4ee2ae323f079335b22db3409
Merge: 9cb743b f26191f
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Feb 21 15:55:52 2013 +0000

    Merge branch 'unstable' of github.com:cowboy-coders/CyclismoProject into unstable

commit 9cb743be9a727191789d81cefb4a820f369a3e8b
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Feb 21 15:54:20 2013 +0000

    Partial user / bike profiles

commit 04cc11f6c02c9709d0e7eec4c054cff7d7f51bbe
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Feb 21 15:53:59 2013 +0000

    Updated readme

commit f26191f222f73f7853493cde14ac62fae75cb9e2
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Wed Feb 20 22:08:32 2013 +0000

    Added comments to PID controller

commit cc8772ab741ff3bd1beb91f5e4060bbaa3ba50d6
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Feb 20 21:55:23 2013 +0000

    fix CyclismoTest

commit b1faf8e3b03775001667b8b2da30162f58bd5764
Author: Doug Szumski <d.s.szumski@gmail.com>
Date:   Sun Feb 17 19:13:04 2013 +0000

    Removed old class implementing BushidoBrakeContoller

commit 01cef372f1894633cb97dd232ac5a7b98ea3c691
Author: Will Szumski <will@cowboycoders.org>
Date:   Sun Feb 17 18:34:17 2013 +0000

    A few powermodel tweaks

commit 9461605e770d2310c1d41cb2b5b1aafc2b9a0fe8
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Feb 14 22:06:14 2013 +0000

    Pid Controller now requests gain values from a GainController

commit 27ce4985ef23bb5ae7a613891f5c5dbe37d8591f
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Feb 14 17:34:54 2013 +0000

    pid logger

commit aed3b79ad0d83937ad86bfb6fedd54530d423fe0
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Feb 14 15:25:00 2013 +0000

    Added pid listener support

commit e055f4d92ad986a550e2176961f80fd1da39ab03
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Feb 14 03:05:10 2013 +0000

    Brake Controller kind of working : not hooked up to powermodel or pid though

commit 2e940aa2cdcbe44b34c2f8a48cdcddc6960fd3e6
Author: Will Szumski <will@cowboycoders.org>
Date:   Thu Feb 14 01:52:08 2013 +0000

    Removed some generic ant stuff from BushidoHeadunit, working towards brake supoort...

commit 8f959ce98471db12ebdc587ff3986226d7c55634
Author: Will Szumski <will@cowboycoders.org>
Date:   Wed Feb 13 19:03:47 2013 +0000

    add PID controller, PowerModel, FixedPeriodUpdater, renamed TrapezoidIntegral to TrapezoidIntegrator

commit 3baefe05e4b3dcbc7347b6023d6c136932d706a8
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 17:56:43 2013 +0000

    ...

commit 84d747f3083d87de19b6846c5a6162172f4af164
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 17:55:16 2013 +0000

    Forget to add javax usb to jturbo class path

commit 88c3c85d9c2ed5e8a6978ff18c3b9ba871a29fc7
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 16:08:57 2013 +0000

    license

commit 4087aa444b0a3bc7cf6b6c0ec9d2f9659726f6f1
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 16:00:40 2013 +0000

    ...

commit 1379e4bd52e848f038bf44e4fee3d35b509980c7
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 15:56:25 2013 +0000

    ...

commit cbffb8a2fa64f7b1fc37277f74371de8a81570de
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 15:48:13 2013 +0000

    more cleaning

commit 8f0608f14876edad273ea7c3e4081883fa38b0d6
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 15:45:52 2013 +0000

    jarlist.cache removed

commit 83f66ffa17094cbf6de74f076bce094112856d35
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 15:24:27 2013 +0000

    Jars

commit ab77d1f5654a2517ab11fa2c9357a406002a250d
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 15:19:03 2013 +0000

    Get rid of metadata / update classpath for jformica projects

commit 5ec088202df62cbd470b7df5e6ccaaca61b2dc37
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 15:13:42 2013 +0000

    A little spring cleaning

commit 44513b9e8bdbe8e47b17e65732f03653b79355ae
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 14:52:04 2013 +0000

    Some eclipse stuff

commit 19b190fc093de75fae8772fa2a9048bd86eb0ca0
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 14:49:34 2013 +0000

    Add Readme

commit 1496e259f42d1d2564b7043054c18668b89a574d
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 05:12:01 2013 +0000

    removed jformica master project

commit 5662ef7b4064bde856c1bd673bde2b3d8acbbd8a
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 05:10:03 2013 +0000

    NarSystem.java

commit 5253658065308dad0ca1ddc63ad433931d2d2759
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 04:51:35 2013 +0000

    bring in nars and jars

commit 95b297d20bde5de359ccacf572aa43a5021624c6
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 04:37:18 2013 +0000

    Bushido _> JTurbo eclipse project

commit f8eebba3e0205c78881c6825150f4ee9fbee3414
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 03:22:21 2013 +0000

    jformica

commit ba72414535a7d305271038fafe3def97e37d447d
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 03:22:21 2013 +0000

    jformica

commit bdfcf4260618b1c39060e1102588ef749422ee9c
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 03:21:17 2013 +0000

    JTurbo branch

commit 0572127ff3db2870a2466ec486fcb7ffecd2fc72
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 03:20:43 2013 +0000

    cyclismo branch

commit 65c0602c6cd8d2d5e5cab938d62c8ad2dfe34896
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 03:19:54 2013 +0000

    added location branch

commit 73996ccbe69b0a121f0acd12c60e92fed8b9d695
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 03:16:04 2013 +0000

    added javax-usb

commit 9384e575fca807b05d0c81066d52f6252a048e89
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 02:03:19 2013 +0000

    Initial

commit 104939e3d8dbdacf2476ce6a370eec75681d7c7d
Author: Will Szumski <will@cowboycoders.org>
Date:   Mon Feb 11 00:50:15 2013 +0000

    Collected projects together