<?xml version="1.0" encoding="UTF-8"?>
<commits type="array">
  <commit>
    <parents type="array">
      <parent>
        <id>0fc90939922cdfee04f77dcc86e4a3a4502ee99a</id>
      </parent>
      <parent>
        <id>f26441023dd5a1773dcd13e1af44c9d4533f9374</id>
      </parent>
    </parents>
    <author>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/62fe609c8c4c5247cc9df9b514f232ab2c77adbb</url>
    <id>62fe609c8c4c5247cc9df9b514f232ab2c77adbb</id>
    <committed-date>2009-12-10T20:19:59-08:00</committed-date>
    <authored-date>2009-12-10T20:19:59-08:00</authored-date>
    <message>Merge branch 'master' of github.com:evanfarrar/opensprints</message>
    <tree>581446ab26ed4e3497bb2109571f1b19ea47bc15</tree>
    <committer>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>ee429f284622bec53ec67480590b17072438efb8</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/f26441023dd5a1773dcd13e1af44c9d4533f9374</url>
    <id>f26441023dd5a1773dcd13e1af44c9d4533f9374</id>
    <committed-date>2009-12-09T11:52:48-08:00</committed-date>
    <authored-date>2009-12-09T11:52:48-08:00</authored-date>
    <message>Can't read a line if we don't print a line.</message>
    <tree>8387fe7939355a626231e787aabb7d975985c063</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>ee429f284622bec53ec67480590b17072438efb8</id>
      </parent>
    </parents>
    <author>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/0fc90939922cdfee04f77dcc86e4a3a4502ee99a</url>
    <id>0fc90939922cdfee04f77dcc86e4a3a4502ee99a</id>
    <committed-date>2009-11-12T21:33:43-08:00</committed-date>
    <authored-date>2009-11-12T21:33:43-08:00</authored-date>
    <message>removed arduino makefile because it doesn't work</message>
    <tree>288d6e7cc567996698ca108b618ac37d515dc5e9</tree>
    <committer>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>c7a66da2a4a0ea3eee3482aef5164d4ded3df75f</id>
      </parent>
    </parents>
    <author>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/ee429f284622bec53ec67480590b17072438efb8</url>
    <id>ee429f284622bec53ec67480590b17072438efb8</id>
    <committed-date>2009-11-12T21:31:20-08:00</committed-date>
    <authored-date>2009-11-12T21:31:20-08:00</authored-date>
    <message>removed non letter-etched faceplate drawings</message>
    <tree>669daf89466e287613e585781080198cea588b1d</tree>
    <committer>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>9458b15615653518c7a4ba394b4e430436bb0b22</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/dee6ae6a0e92a3c7197fb65bd07ae661df08fca4</url>
    <id>dee6ae6a0e92a3c7197fb65bd07ae661df08fca4</id>
    <committed-date>2009-10-25T20:16:37-07:00</committed-date>
    <authored-date>2009-10-25T20:16:37-07:00</authored-date>
    <message>Adds a button to start the arduino ide to the config-&gt;upgrade screen to upgrade your firmware.</message>
    <tree>b045edae8b29cc60721f7fa812edc2884e2b6678</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>c7275e92ec7d14153e5374e13c9572aec1150099</id>
      </parent>
    </parents>
    <author>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/87282a5d6060eaab2e7701717d5348fb8b3e5994</url>
    <id>87282a5d6060eaab2e7701717d5348fb8b3e5994</id>
    <committed-date>2009-09-22T23:48:18-07:00</committed-date>
    <authored-date>2009-09-22T17:44:45-07:00</authored-date>
    <message>firmware - send 'm' to toggle Arduino mock mode. that message no longer starts a race.</message>
    <tree>2b2f62ce311e126885a9c2373d03a81638073ec0</tree>
    <committer>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>8bbf57f97873c408d390bb7892aec2f334acbd0f</id>
      </parent>
    </parents>
    <author>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/de13399530b1b485e1706ca2e2574c6eb0450d57</url>
    <id>de13399530b1b485e1706ca2e2574c6eb0450d57</id>
    <committed-date>2009-05-17T11:13:07-07:00</committed-date>
    <authored-date>2009-05-17T11:13:07-07:00</authored-date>
    <message>hardware: interface board kicad schem v2.3.0 completed. interface board
geda barebones archive removed.</message>
    <tree>a9a336810a365bcd9eef28e8d6aa657059ecc914</tree>
    <committer>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>771dd895438bb18087eebd89dd78896c90c5ce12</id>
      </parent>
    </parents>
    <author>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/8bbf57f97873c408d390bb7892aec2f334acbd0f</url>
    <id>8bbf57f97873c408d390bb7892aec2f334acbd0f</id>
    <committed-date>2009-05-11T21:02:47-07:00</committed-date>
    <authored-date>2009-05-11T21:02:47-07:00</authored-date>
    <message>slight change to the arduino Makefiles</message>
    <tree>d78b48f51b6b3ffcf014607d7c7e400fa55f1e81</tree>
    <committer>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>5919b8857271b3257b957e215be94ae49b484e31</id>
      </parent>
    </parents>
    <author>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/694b56c9a654645dd460b865d8aad5cbc2254655</url>
    <id>694b56c9a654645dd460b865d8aad5cbc2254655</id>
    <committed-date>2009-05-07T21:12:50-07:00</committed-date>
    <authored-date>2009-05-07T20:22:07-07:00</authored-date>
    <message>cleaned out arduino IDE files from the repository. Updated Makefiles for basic_msg and advanced_msg. New way of doing things: the opensprints/firmware/arduino directory now needs to have a manually created symbolic link called arduino_install_dir that points to wherever the arduino IDE is located on the system e.g. ~/Desktop/arduino-0015

a new version of opensprints_installer.run reflects that change. download it at http://gist.github.com/raw/108613/cb56feab53b54df5f38a1893670572ec182c4583/opensprints_intstaller.run</message>
    <tree>f5c4ca20668ae8427e110dc5e931228d43f98ade</tree>
    <committer>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>70a2ae2e569d5839390ca7e7989e0b729e2ab88c</id>
      </parent>
    </parents>
    <author>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/7a107e4407293c674800b9c2b5ec723af6e4bc75</url>
    <id>7a107e4407293c674800b9c2b5ec723af6e4bc75</id>
    <committed-date>2009-04-01T20:20:05-07:00</committed-date>
    <authored-date>2009-04-01T18:45:23-07:00</authored-date>
    <message>firmware: removed startPin and stopPin code. now only controlling one signal line for each racer. Each &quot;go&quot; signal line both start and stop LEDs. pins 9..12 for racers 0..3. wire each of the &quot;go&quot; signals to the fourth pin on the RJ45.</message>
    <tree>de136b98c0ed8bad90057bc21fc7be021ef7cd71</tree>
    <committer>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>de0a869f29a6f5c5a1b0e224241788b7131665d6</id>
      </parent>
    </parents>
    <author>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/f1765d7a0ddf5d015f00faf8ba175001b2858722</url>
    <id>f1765d7a0ddf5d015f00faf8ba175001b2858722</id>
    <committed-date>2009-03-19T21:19:46-07:00</committed-date>
    <authored-date>2009-03-19T21:19:46-07:00</authored-date>
    <message>firmware: fixed bug - if race is already running sending the 'go'
command would not restart the countdown timer.

new feature: send the character 'm' to activate mock sensor readings.

charBuff[8] and charBuffLen changed to type unsigned int</message>
    <tree>6dac352dcec1dc2b877255eb2a561195906bfba6</tree>
    <committer>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>c0b2c54bc4bf01b5b21029ff095d9519c1f86203</id>
      </parent>
    </parents>
    <author>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/ed899b7d6504a8878e6ad3e95c5fa37245377bf1</url>
    <id>ed899b7d6504a8878e6ad3e95c5fa37245377bf1</id>
    <committed-date>2009-03-10T01:13:21-07:00</committed-date>
    <authored-date>2009-03-10T01:13:21-07:00</authored-date>
    <message>need to test:

This is how i've written the firmware to receive the value for raceLengthTicks from OpenSprints:

the micro waits for the 'l' character. that's the lower case letter that begins the word 'letter', not a 1 or an upper case i.
then the next two characters it receives need to contain the value for raceLengthTicks.
* the first character is raceLengthTicks modulo 256.
* the second character is Floor(raceLengthTicks/256).
then it looks for the next character to be carriage return, or '\r'.
when it receives all that, it sends back the string &quot;OK 12345\r&quot; where 12345 would be raceLengthTicks back in decimal form.

we probably don't need to end the two numerical chars with the carriage return. the maximum value of the byte being sent representing raceLengthTicks would correspond to a 10 mile race for rollers with 0.25 meter circumference.

I'm thinking that this interaction happens when a user presses the &quot;Start Race&quot; button. OpenSprints sends the 4 characters for the raceTickLength message. OpenSprints waits to receive the &quot;OK 12345\r&quot; message before sending the micro the 'g' command to start the race.
It seems safest to set the raceLengthTicks right before every race, although that step could be taken at other idle moments.</message>
    <tree>b7e23d23e05e3f431964408a0bb4857fc962d1e1</tree>
    <committer>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>3d652c25bdfe703bd5186a13953e3dfc4a4b4844</id>
      </parent>
    </parents>
    <author>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/09d68c607ec1b483e010f9d30d39ce06bac9580d</url>
    <id>09d68c607ec1b483e010f9d30d39ce06bac9580d</id>
    <committed-date>2009-03-01T20:38:56-08:00</committed-date>
    <authored-date>2009-03-01T20:38:56-08:00</authored-date>
    <message>basic_msg firmware extended with start and stop LEDs on dig pins 11 and 12.</message>
    <tree>192ade5793d902a7b2d0a12c0f179f6d444079ec</tree>
    <committer>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>5d86b3690a95c7fb0770fae8f5d4d5ef5b107750</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/26e86fa6c9b8b3ca0bfcfbbf5d853d229934ac94</url>
    <id>26e86fa6c9b8b3ca0bfcfbbf5d853d229934ac94</id>
    <committed-date>2009-02-19T20:09:42-08:00</committed-date>
    <authored-date>2009-02-19T20:09:42-08:00</authored-date>
    <message>BUG: the race wasn't ending since my last change on Mon Jan 26 23:41:01 2009 -0600. Please re-flash your firmware if you have any firmware from between 1/26 and 2/19.</message>
    <tree>cac648772a63b1f7be2fa9d521be97bcbc8fefdd</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>6638e32342c8e3406d23a5a28944c81db83291aa</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/179c8c0e21de22c5f8f9fdc740a86587034b1227</url>
    <id>179c8c0e21de22c5f8f9fdc740a86587034b1227</id>
    <committed-date>2009-01-26T21:42:15-08:00</committed-date>
    <authored-date>2009-01-26T21:41:01-08:00</authored-date>
    <message>Cleaned up the number of numbered variables in the basic_message.</message>
    <tree>51bac3c504c3997d1dd859b13aa9214445fe583a</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>03981145d4ace140154ddb6a10e949ea2971f089</id>
      </parent>
    </parents>
    <author>
      <name>Morgan Venable</name>
      <email>morgan@moto.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/6006807937ced7627e3c019e06d2b441aa668b6c</url>
    <id>6006807937ced7627e3c019e06d2b441aa668b6c</id>
    <committed-date>2009-01-23T21:48:41-08:00</committed-date>
    <authored-date>2009-01-23T21:48:41-08:00</authored-date>
    <message>advanced message bugfix -- reset time command was not clearing the
outgoing packet immediately

this was resulting in pre-start data getting sent after the reset
command.  existing packet is now cleared on &quot;g&quot; command.</message>
    <tree>13a7803e24f2eb4fdd27e49713d4d89dade1dcad</tree>
    <committer>
      <name>Morgan Venable</name>
      <email>morgan@moto.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>9e8a738bcd36a0489490d6935e1e1b6e8353fe26</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/750a9df6a9b660a8b1486ff198f190f06d55218c</url>
    <id>750a9df6a9b660a8b1486ff198f190f06d55218c</id>
    <committed-date>2008-12-18T14:48:15-08:00</committed-date>
    <authored-date>2008-12-18T14:48:15-08:00</authored-date>
    <message>Just a little make clean'ing</message>
    <tree>ec3833cde12027a140b785dffd63eaa83829986f</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>c1bf942edcc77a3b5b8191117c416c23db5f0c97</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/9e8a738bcd36a0489490d6935e1e1b6e8353fe26</url>
    <id>9e8a738bcd36a0489490d6935e1e1b6e8353fe26</id>
    <committed-date>2008-12-15T18:04:21-08:00</committed-date>
    <authored-date>2008-12-15T18:04:21-08:00</authored-date>
    <message>Bunny Rabits!</message>
    <tree>c000bc873dfa908148b04d8a8867340eb6bc8d4a</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>ad968b35cc889754077cc59f9b0967046ef8d5aa</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/b65d5da0a52283a24c5b774d649287a6593186f3</url>
    <id>b65d5da0a52283a24c5b774d649287a6593186f3</id>
    <committed-date>2008-12-15T12:23:40-08:00</committed-date>
    <authored-date>2008-12-15T12:23:40-08:00</authored-date>
    <message>Fixed some hilarious bugginess introduced when the basic_msg firmware was moved to 4 racers.</message>
    <tree>204b5fee16bce046f85408ba3a816cd86996271b</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>f0e498321f992081b1e20297a9ef4b934a079457</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/28447799f21169bbb3331187c334669f6d1e17bb</url>
    <id>28447799f21169bbb3331187c334669f6d1e17bb</id>
    <committed-date>2008-12-14T11:50:53-08:00</committed-date>
    <authored-date>2008-12-14T11:50:32-08:00</authored-date>
    <message>Change the add racer button to a _button_ and not an image with a click attribute. Tab for the win!</message>
    <tree>2ea6e49c54dbb0315a1bfc171b24481a365d799d</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>c02ac7968de0d3ec9b2ef82eae75ced70df938c1</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/f0e498321f992081b1e20297a9ef4b934a079457</url>
    <id>f0e498321f992081b1e20297a9ef4b934a079457</id>
    <committed-date>2008-12-11T19:45:45-08:00</committed-date>
    <authored-date>2008-12-11T19:45:45-08:00</authored-date>
    <message>Four racers in the basic_message firmware.</message>
    <tree>15b986720ccb7ed53803fea4bfa360d6943d86ec</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>6ff6de2c9f3baf809aa00bd75b60938fdc78494f</id>
      </parent>
    </parents>
    <author>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/e03c37716b3fdb2fca6f95e6f9b41d3d6838b996</url>
    <id>e03c37716b3fdb2fca6f95e6f9b41d3d6838b996</id>
    <committed-date>2008-12-02T16:45:57-08:00</committed-date>
    <authored-date>2008-12-02T16:45:57-08:00</authored-date>
    <message>internal pull-ups now enabled on four input pins for monitoring sensors.</message>
    <tree>466ed60afac356cccd28bfa261cf9d41f4ca4fd1</tree>
    <committer>
      <name>Luke Orland</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>f5f3cfeae3953ac795437df99bcef35b1eb32e57</id>
      </parent>
    </parents>
    <author>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/5fcc38a008eef22fc22ee3d71be18b21fd2dead3</url>
    <id>5fcc38a008eef22fc22ee3d71be18b21fd2dead3</id>
    <committed-date>2008-11-17T06:26:06-08:00</committed-date>
    <authored-date>2008-11-17T06:26:06-08:00</authored-date>
    <message>firmware: cleaned out the arduino directory, and created two development branches.
 * basic_msg is the original firmware written by Evan Farrar.
 * advanced_msg is the newer firmware written by Morgan Venable.</message>
    <tree>2e3a0a294817c89063ee715037b84fe36ebda6db</tree>
    <committer>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>924ac52b53232f4a7aef0e4f96ddb372d95af19b</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/182c57408801d2e99886271ae7680f4913d8c1b4</url>
    <id>182c57408801d2e99886271ae7680f4913d8c1b4</id>
    <committed-date>2008-11-14T18:56:37-08:00</committed-date>
    <authored-date>2008-11-14T18:56:37-08:00</authored-date>
    <message>Made morgan's debugged firmware the firmware. See 3b77ea012765f34fe6a09dd15e441db82e2f6d3d for the full breakdown of the problem and it's solution</message>
    <tree>7cc199c76904afa6c5b83137af2ec0d0f7d8b746</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>ed94412cf062d338bc2764479284d56930ee864f</id>
      </parent>
    </parents>
    <author>
      <name>Luke Orland</name>
      <email>orluke@orluke-ub84.(none)</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/3b77ea012765f34fe6a09dd15e441db82e2f6d3d</url>
    <id>3b77ea012765f34fe6a09dd15e441db82e2f6d3d</id>
    <committed-date>2008-11-14T07:41:21-08:00</committed-date>
    <authored-date>2008-11-14T07:41:21-08:00</authored-date>
    <message>morgan's opensprints sensor debugged firmware:
Symptom:  some ticks get missed -- timing of the frames is always
correct, but input &quot;abababababab&quot; sometimes comes out as
&quot;ababaaababab&quot; -- one of the b's turns into an a.

The behavior is correlated to floating the other sensor pins.  When
they float, they generate occasional random GPIO interrupts.
This, in turn, causes the code in the interrupt handler to be executed.

The overarching interrupt structure is as follows (Evan, this may help
clarify the convoluted code ;)   ):

2ms Frame interrupt:
 Happens every 2ms.
 This is fast enough that no sensor will ever tick twice during a
Frame (500Hz = &gt;250mph)
 Actions:
   Check each sensor to see if it has a tick NOW.
   Create the appropriate frame output (x + 'a' for x in [0x00:0x0F])
   Append the frame to the output packet

GPIO interrupt:
 Happens on every sensor pin change, up or down
 Actions:
   Read the sensor pins
   Compare to last state to determine which pins transitioned and in
which direction
   Set appropriate tickNow flags for the 2ms Frame interrupt
   Save their state for next comparison

What was going wrong:
 When setting the tickNow flags, I wasn't checking to see if each
sensor already had a tickNow = True.

 This meant that for each interrupt, only the pin changes which
TRIGGERED that specific interrupt would
 create valid tickNow flags.

 So if, for example, sensor 0 had ticked previously but had not been
cleared by the 2ms Frame interrupt,
 the interrupt handler was incorrectly clearing the bit when another
tick came through on a different sensor.

The code below appears to eliminate the problem.  (added protection
for the tickNow flags)

I'm still not clear why this was only showing up really egregiously
when going faster than about 12mph,
but I'm going to guess that it has something do with the more frequent
transitions causing the other pins
to float around more rapidly.

I'm very glad I decided to keep the protocol in printable characters :)

/////////////////////////////////////////////////////////////////////////////////////////////
//GPIO on-change interrupt vector handler
/////////////////////////////////////////////////////////////////////////////////////////////
ISR(PCINT2_vect) {
   cli();
   val0 = digitalRead(SENSOR_0_PIN);
   val1 = digitalRead(SENSOR_1_PIN);
   val2 = digitalRead(SENSOR_2_PIN);
   val3 = digitalRead(SENSOR_3_PIN);
   buttonPinVal = digitalRead(BUTTON_PIN);

// If the frame check interrupt hasn't yet dealt with a tickNow event,
make sure you don't erase that tick
// Since nobody will ever drive the sensor faster than 500Hz (250
actual ticks/second),
// the frame check interrupt will never get multiple ticks on a single sensor.
//
// Previously this code did not check, causing ticks to be erased if
another pin changed before the frame check
// interrupt serviced the appropriate tickNow flag

   if (!racer1TickNow) racer1TickNow = ((val0 == false) &amp;&amp;
(lastSensor0Value == true));
   if (!racer2TickNow) racer2TickNow = ((val1 == false) &amp;&amp;
(lastSensor1Value == true));
   if (!racer3TickNow) racer3TickNow = ((val2 == false) &amp;&amp;
(lastSensor2Value == true));
   if (!racer4TickNow) racer4TickNow = ((val3 == false) &amp;&amp;
(lastSensor3Value == true));
   if (!buttonNow) buttonNow = ((buttonPinVal == false) &amp;&amp;
(lastButtonValue == true));

   lastSensor0Value = val0;  // now that you've used this value of
val#, make sure it's recorded as the standing value...
   lastSensor1Value = val1;
   lastSensor2Value = val2;
   lastSensor3Value = val3;
   lastButtonValue = buttonPinVal;

   inputChange = true;
   sei();
}</message>
    <tree>37f23156b5e869d5870f44fad367a41097dcd538</tree>
    <committer>
      <name>Luke Orland</name>
      <email>orluke@orluke-ub84.(none)</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>2155ce897517ea3e1fd2f78ec39022a4e5fdbd6f</id>
      </parent>
    </parents>
    <author>
      <name>evan</name>
      <email>evan@evan-desktop.transis.net</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/f5ec6713d609e1d2beb53e604decfca54edf232d</url>
    <id>f5ec6713d609e1d2beb53e604decfca54edf232d</id>
    <committed-date>2008-10-16T09:15:28-07:00</committed-date>
    <authored-date>2008-10-16T09:15:28-07:00</authored-date>
    <message>Just redeleting the ubw stuff.</message>
    <tree>bc8e9588e8bf6fbdf23b603cec797203d2fce605</tree>
    <committer>
      <name>evan</name>
      <email>evan@evan-desktop.transis.net</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>fda6d66d5e38fac285c17da8cdc33806d3e39614</id>
      </parent>
    </parents>
    <author>
      <name>Morgan Venable</name>
      <email>morgan@moto.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/2155ce897517ea3e1fd2f78ec39022a4e5fdbd6f</url>
    <id>2155ce897517ea3e1fd2f78ec39022a4e5fdbd6f</id>
    <committed-date>2008-10-15T18:49:22-07:00</committed-date>
    <authored-date>2008-10-15T18:49:22-07:00</authored-date>
    <message>initial</message>
    <tree>e3cc2bd20fce2ee82c0e249089f3a05cc21c7123</tree>
    <committer>
      <name>Morgan Venable</name>
      <email>morgan@moto.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>e4dcb279726f5228dc71438d47f5d9de523d178f</id>
      </parent>
    </parents>
    <author>
      <name>evan</name>
      <email>evan@evan-desktop.transis.net</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/fda6d66d5e38fac285c17da8cdc33806d3e39614</url>
    <id>fda6d66d5e38fac285c17da8cdc33806d3e39614</id>
    <committed-date>2008-10-15T14:49:48-07:00</committed-date>
    <authored-date>2008-10-15T14:49:48-07:00</authored-date>
    <message>Removed the UBW/Microchip firmware. Edited the LICENSE accordingly. Now 100% gpl software.</message>
    <tree>3581e848a8980ef9c1117a46d401aa07cb811fbc</tree>
    <committer>
      <name>evan</name>
      <email>evan@evan-desktop.transis.net</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>5301d680ac1b86c1795d1564b68948306bc10120</id>
      </parent>
    </parents>
    <author>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/cd241e6186188ec74fa29dc7fd0bbe9e7a367ea9</url>
    <id>cd241e6186188ec74fa29dc7fd0bbe9e7a367ea9</id>
    <committed-date>2008-10-02T06:13:59-07:00</committed-date>
    <authored-date>2008-10-02T06:13:59-07:00</authored-date>
    <message>programmed an arduino. in the process, some new files got created.</message>
    <tree>6dce6d35ca7f220959cbf6a9e35e863cd71f66ef</tree>
    <committer>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>562d1961e825811be92b7369c8288b1689ed2ef2</id>
      </parent>
    </parents>
    <author>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/5301d680ac1b86c1795d1564b68948306bc10120</url>
    <id>5301d680ac1b86c1795d1564b68948306bc10120</id>
    <committed-date>2008-09-23T08:45:19-07:00</committed-date>
    <authored-date>2008-09-23T08:45:19-07:00</authored-date>
    <message>the arduino Sketchbook is now in opensprints/firmware/arduino/opensprints/opensprints.pde</message>
    <tree>a0b4742d1970a8e502624b622659f95792c0abe7</tree>
    <committer>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>16a9f085416b7858c873b9610e658f567ddddc0f</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/99efe0db8dc8af14e3aa37693709fed0aea75e69</url>
    <id>99efe0db8dc8af14e3aa37693709fed0aea75e69</id>
    <committed-date>2008-07-25T23:09:41-07:00</committed-date>
    <authored-date>2008-07-25T23:09:41-07:00</authored-date>
    <message>Fixed some broken edge cases in the race logic.</message>
    <tree>b838dd7224667d2fec8691b573c793e81897fdd5</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>b6facf3e23c5872dc537ddaab80dd563eb9bec0a</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/d84e7fd112d1f0728e799d00c8a8c8c738ac93f9</url>
    <id>d84e7fd112d1f0728e799d00c8a8c8c738ac93f9</id>
    <committed-date>2008-07-24T00:19:40-07:00</committed-date>
    <authored-date>2008-07-24T00:19:40-07:00</authored-date>
    <message>Made the pushbutton work. NOPC is now complete!</message>
    <tree>c9b30b96c709f800136176d2baccdc52d813e795</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>ea7a51c957c431ab190146f995092dbb04149f91</id>
      </parent>
    </parents>
    <author>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/3d52d3dceb9217ba0b87a22d6a117d9cf6d6cc39</url>
    <id>3d52d3dceb9217ba0b87a22d6a117d9cf6d6cc39</id>
    <committed-date>2008-07-23T14:35:09-07:00</committed-date>
    <authored-date>2008-07-23T14:35:09-07:00</authored-date>
    <message>arduino firmware:
 * start indexing rider/sensor/val names with 0 instead of 1 e.g. rider1 is now rider0, and sensor2 is now sensor1.
 * tick messages sent over serial interface begin with &quot;0:&quot; and &quot;1:&quot; instead of &quot;1:&quot; and &quot;2:&quot;.
 * changed the type for racer0Ticks and racer1Ticks from 'int' to 'unsigned long' (an atempt to fix the bug where the serial outputs spits out junk once the value for that variable gets above around 15000.)

NEED to update the PC app to look for &quot;0:&quot; and &quot;1:&quot; instead of &quot;1:&quot; and &quot;2:&quot;.</message>
    <tree>b14288fe19e299697f5a177d2daa2a1b0fad88ea</tree>
    <committer>
      <name>LJO</name>
      <email>orluke@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>dca3a9a38697218d45870de96ba2c0473cc30e82</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/490dc140d2a53e3f270e1c06180e0d957cf1e3f5</url>
    <id>490dc140d2a53e3f270e1c06180e0d957cf1e3f5</id>
    <committed-date>2008-07-21T23:23:03-07:00</committed-date>
    <authored-date>2008-07-21T23:23:03-07:00</authored-date>
    <message>Now the sensor only updates at a specific frequency instead of continuously</message>
    <tree>eaf09076de4a37a228c9161040840ec1f5883273</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>4e2dda04b9ed56e4cb4f58c8d9401bc9446fcc80</id>
      </parent>
    </parents>
    <author>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </author>
    <url>http://github.com/evanfarrar/opensprints/commit/b60573cec963820a48b3a4e1ee5405940bcd6093</url>
    <id>b60573cec963820a48b3a4e1ee5405940bcd6093</id>
    <committed-date>2008-07-19T23:17:21-07:00</committed-date>
    <authored-date>2008-07-19T23:17:21-07:00</authored-date>
    <message>Now the winner is indicated with a blink of the LEDs.</message>
    <tree>d40b50e34cf7ff5307edf4f540bfccadd0b72525</tree>
    <committer>
      <name>Evan Farrar</name>
      <email>evanfarrar@gmail.com</email>
    </committer>
  </commit>
</commits>
