Autotest and BetaBrite

Posted by – February 11, 2008

I’ve finally added USB betabrite support to my Betabrite library, and released version 1.0.0.

Version 1.0.0 also includes an autotest module so that you can see your autotest output on the sign. Here is what mine looks like:

Betabrite Autotest

The sign shows errors too, but it scrolls, so I couldn’t get it in one picture. Anyway, if you’ve got the USB sign, all you have to do to get it working with autotest is add this to your .autotest file:

require 'betabrite/autotest'
require 'usb'

Autotest::BetaBrite.hook(BetaBrite::USB)

The hook method takes a block, and you can modify your messages before they are sent to the sign. For example, I wanted my failures to be blue, so my .autotest file looks like this:

require 'betabrite/autotest'
require 'usb'

Autotest::BetaBrite.hook(BetaBrite::USB) do |failures, erorrs|
  failures.rgb('0000FF') if failures.green?
end
4 Comments on Autotest and BetaBrite

Respond

  1. Zach Inglis says:

    Is it wrong that I find that really awesome?

  2. John Schult says:

    Does it work with the Betabrite Prism?

  3. Christophe Huygens says:

    Hi,

    great work – being a total Ruby newbie, can you give an example of where mode or position is set in the code. Everything works well at this end, but I can t figure out this &block stuff… It was sort of clear to me using the method set_mode in previous versions, but I am at a loss now.

    Thanks,
    Xtof.

Respond

Comments

Comments