<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>build/bin/arduino-ide</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,3 +3,5 @@ conf.yml
 *.swp
 log/*.yml
 *.bak
+firmware/arduino/arduino-0017/*
+firmware/arduino/arduino-0017</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -32,8 +32,10 @@ end
 
 task :build =&gt; :check_version_provided do
   here = Dir.pwd
+  abort(&quot;You need to provide the arduino ide in firmware/arduino/arduino-0017&quot;) unless File.exists?(&quot;firmware/arduino/arduino-0017&quot;)
   `rm -rf /tmp/build` if File.exists?('/tmp/build')
-  `cp -L -R build /tmp/build`
+  `cp -R build /tmp/build`
+  `cp -R ../opensprints /tmp/build/`
   Dir.chdir('/tmp/build')
   `debuild --no-tgz-check`
   Dir.chdir(here)</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -8,5 +8,5 @@ Homepage: http://www.opensprints.org
 
 Package: opensprints
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, build-essential, libssl-dev, libreadline5-dev, zlib1g-dev, gcc-avr, avr-libc, make, gtkterm, avrdude, binutils-avr
+Depends: ${shlibs:Depends}, ${misc:Depends}, build-essential, libssl-dev, libreadline5-dev, zlib1g-dev, gcc-avr, avr-libc, make, gtkterm, avrdude, binutils-avr, sun-java6-jre
 Description: A program for running goldsprints</diff>
      <filename>build/debian/control</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,5 @@
 opensprints/* /opt/opensprints
 bin/shoes2.run /opt/opensprints
 bin/opensprints /usr/bin
+bin/arduino-ide /usr/bin
 shortcuts/opensprints.desktop /usr/share/applications</diff>
      <filename>build/debian/install</filename>
    </modified>
    <modified>
      <diff>@@ -113,6 +113,9 @@ void checkSerial(){
           charBuffLen = 0;
           isReceivingRaceLength = true;
       }
+      if(val == 'v') {
+        Serial.print(&quot;basic-1&quot;);
+      }
       if(val == 'g') {
         for(int i=0; i&lt;=3; i++)
         {</diff>
      <filename>firmware/arduino/basic_msg/basic_msg.pde</filename>
    </modified>
    <modified>
      <diff>@@ -362,10 +362,14 @@ class ConfigController &lt; Shoes::Main
       stack do
         version = `dpkg-query -W -f='${Version}' opensprints`
         version = File.readlines('build/debian/changelog').first.gsub(/.*\((.*)\).*/,'\1').strip if version.empty?
-        para &quot;You're using version: #{version}&quot;
-        button(&quot;Update!&quot;, :width =&gt; 200) do
+        para &quot;You're using software version: #{version}&quot;
+        button(&quot;Update the software!&quot;, :width =&gt; 200) do
           `update-manager`
         end
+        para &quot;You're using firmware version: #{SENSOR.version}&quot;
+        button(&quot;Update the firmware&quot;, :width =&gt; 200) do
+          `arduino-ide`
+        end
       end
     end
   end</diff>
      <filename>lib/controllers/config_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,49 @@
 #Arduino: a sensor written for the arduino open source hardware.
 class Sensor
   attr_accessor :queue
+  attr_accessor :version
   def initialize(filename=nil)
     raise MissingArduinoError unless File.writable?(filename)
     #HACK oogity boogity magic happens here:
     `stty -F #{filename} cs8 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke -noflsh -ixon -crtscts`
     @f = File.open(filename, 'w+')
     ticks = ($RACE_DISTANCE / $ROLLER_CIRCUMFERENCE).floor
+    get_version
+    send_length(ticks)
+  end
+
+  def get_version
+    @f.flush
+    @f.putc ?v
+    @f.putc ?\r
+    @f.flush
+    begin
+      Timeout.timeout(1){
+        @version = @f.readline
+      }
+    rescue Timeout::Error
+      puts &quot;Timeout getting version&quot;
+    end
+    puts @version
+  end
+
+  def send_length(ticks)
+    @f.flush
     @f.putc ?l
     @f.putc(ticks % 256)
     @f.putc(ticks / 256)
     @f.putc ?\r
+    begin
+      Timeout.timeout(1){
+        @length_status = @f.readline
+      }
+    rescue Timeout::Error
+      puts &quot;Timeout setting length&quot;
+    else
+      #TODO raise an ErrorReceivingTickLength and catch it in the app.
+      #raise @length_status unless @length_status=~/OK/
+    end
+    puts @length_status
   end
 
   def start</diff>
      <filename>lib/sensors/basic_message_arduino_sensor.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,13 @@
-#Arduino: a sensor written for the arduino open source hardware.
+#Mock: a sensor intended to mock the behavior of the basic_message arduino firmware. The behavior will always repeat: the first racer will go fast, the second slow, the third will go as fast as the first and the fourth will give up after 2 seconds.
 class Sensor
   attr_accessor :r
   def initialize(filename=nil)
   end
 
+  def version
+    &quot;mock-1&quot;
+  end
+
   def start
     @fast,@slow,@random = [[]]*3
 </diff>
      <filename>lib/sensors/mock_sensor.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>build/opensprints</filename>
    </removed>
  </removed>
  <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>
