Retry reading mcv4 fw version in case of failure

On a cold boot, the motor rail is not initially on.  It is only
possible to communicate with the motor controllers when the motor rail
is powered-up.  There is a non-zero period of time between the motor
rail being turned on and the point when we can communicate with the
motor controller.

We were trying to read the firmware version out of the motor
controller too soon, before it had finished powering-up.  This patch
makes it retry the process of reading the firmware version up to 10
times before giving up.

This means that on cold-boot, the message "Warning: Motor board is not
running the expected firmware" will no longer appear unless the motor
board is actually running the wrong firmware.

Change-Id: I7c2eb050d97166cdb40f6fcff309d1ee0c4945e2
Dump detected USB devices to log on start-up

Since both the motor controllers and jointio replacement are now USB,
they don't appear in the SRIC device listing on start-up.  This patch
adds listing of the detected USB devices.  It also adds a "serialnum"
property to the Motor and Ruggeduino objects so that their serial
numbers can be displayed in this listing.

Change-Id: I23a310d644d5997d390652d0325e4e800bcb96ad
Remove motor and jointio firmwares

We no longer use these boards, so there's no point in keeping the
firmwares here.

Change-Id: I8b27c8b092614d9de3d26f2a89c75f1f3aad30a1
Stop fw splash from showing when there's no update

The firmware-update splash screen would always display for a short
period of time upon boot, regardless of whether an update was
occuring.  This patch uses the power board's SRIC vbuf to determine
whether an update is necessary, and then starts the splash screen if
appropriate.

Change-Id: I676f7da4e938d89b1dc55ba889901b3a94a43f99
Add the option of splitting up Robot construction

In order to allow teams to initialise their own hardware, and override
the hardware-driving routines that we provide, this patch splits up
the Robot construction into three phases:

1) Construction
2) Initialisation/Enumeration
3) Waiting for a start event

Teams can still use the normal `R = Robot()` in most cases.  However,
when they want to do more advanced things, they may want to do this
instead:

R = Robot.setup()
 ... configure Robot object's enumeration here ...
R.init()
 ... initialise their hardware here ...
R.wait_start()

Change-Id: Ief425cd220afd97119c89725b2413310b7ff9eb7
Add support for custom Ruggeduino firmware

This patch extends the Ruggeduino support to provide three options:

 1) Use our firmware
    In this case, nothing changes from the user's perspective.

 2) Use their own firmware based on our firmware.
    Users should change the string "SRduino" in the firmware
    version command response to be something else -- e.g. "SRcustom".

    They then implement a class that inherits from Ruggeduino:

    class CustomRuggeduino(Ruggeduino):
        def test(self):
            print "test"

    They then have two choices of how to tell our software to use
    this custom class to work with their ruggeduino:

    a) Using the ruggeduino ID:
       R = Robot.setup()
       R.ruggeduino_set_handler_by_id( "123123123123123",
				       CustomRuggeduino )
       R.init()
       R.wait_start()
       R.ruggeduinos[0].test()

    b) Using the first part of the firmware version:
       R = Robot.setup()
       R.ruggeduino_set_handler_by_fwver( "SRcustom",
       					  CustomRuggeduino )
       R.init()
       R.wait_start()
       R.ruggeduinos[0].test()

 3) Use their own firmware not based on our firmware
    In this case, they don't want our code to touch their stuff.
    So, they tell pyenv to ignore the ruggeduino.  This can only be
    done by ID, as the concept of firmware version is a feature of our
    firmware (and those derived from it).

    R = Robot.setup()
    R.ruggeduino_ignore_id( "123123123123123" )
    R.init()

    # This is the ignored ruggeduino's device path
    print R.ruggeduinos[0].path

    R.wait_start()

    As seen above, ignored Ruggeduinos will appear in the
    Robot.ruggeduinos dictionary as IgnoredRuggeduino objects.  These
    objects provide two properties: path (the device path), and
    serialnum (the device serial number).

Change-Id: Iba2cfa5058c776686ac033471e43bef5a8b6bfea
Remove obsolete JointIO, event and poll API parts

These aren't being used this year (SR2014), as we've shipped
Ruggeduinos instead of the JointIO boards. This commit removes the
obsolete source code and exports that only related to the JointIO
board.

Change-Id: I29721c2e8e93853e996e9979d3e01745d47d84d5
Ruggeduino: Show the fw genre if no handler found

When no handler is found for a connected Ruggeduino, include the
firmware genre in the error message.

Change-Id: I7e077202264ebfb0a99a42d50fae281817615f4f
Merge alt-fw branch

This brings in support for alternative supports for the Ruggeduinos.
Throw an exception if init is called a second time

The Robot can only be initialised once.  Calling init a second time is
not a sensible thing to be doing.

Change-Id: Iea8f7585f2496561da51b7b724818a31b5423139
Raise exception if enum configured after enum

If the user attempts to configure enumeration after enumeration has
already happened, then this is clearly a bug.  Throw an exception if
they try to do this.

Change-Id: If846cf2d097cec4dfecbf78c62891f55254269fe
Add brackets to __init__.py imports and wrap

Long lines of imports can be wrapped by putting the things that are
being imported in brackets.

Change-Id: If39b4b8a664f3802f9369f696d0da90318990108
Send all log messages through the logging module

There are times when it is useful to be able to increase the verbosity
of the log messages from pyenv, as well as times when it is useful to
reduce that verbosity.  Python's logging module allows one to set
filters and handlers for different levels of logs, so we should use
that to allow one to configure those things.

Since we don't want to enforce our teams to have to configure the
logging module in order to write some code, the Robot() constructors
now configure the logger to send messages with the INFO level and
above to stdout by default.

If and when the user wishes to configure the logging otherwise, they
can set the "config_logging" argument passed to Robot() (or
Robot.setup()) to be False.  To see any log messages, they will then
have to configure the logging module themselves.

Change-Id: Id8f623bfb1d4e622284d20c673db04232acee041
pre_init decorator: Raise more precise exception

Raise a custom exception object rather than just an Exception instance
when the user calls a function they shouldn't have after init().

Change-Id: I94d1c7c7772888f3637d35745bfec45f9cbde7fa
Merge branch 'init-lim'

Resolved conflicts:
	pyenv/pylib/sr/robot.py

Change-Id: I49878b3aede11a71ded3b7fffaaebb6f3917b882
Update squidge to get a new splash screen

Built from squidge.git rev d53c2e1004ed.

Change-Id: I115f3816d3c5e4f5bd9bc8be45bf966d03bd4457
Remove unused enumerate_tty.py

This isn't used.  We used udev.

Change-Id: I30706e68711c62bc52c5f205db62474c15a84d62