/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock

« back to all changes in this revision

Viewing changes to src/test_mode.cc

  • Committer: edam
  • Date: 2012-02-25 01:29:52 UTC
  • Revision ID: tim@ed.am-20120225012952-32q8gg07aovk3qxh
updated arduino.mk

Show diffs side-by-side

added added

removed removed

1
 
#include "test_mode.h"
2
 
 
3
 
 
4
 
TestMode::TestMode()
5
 
    :
6
 
        MinorMode( 1 )
7
 
{
8
 
}
9
 
 
10
 
 
11
 
void TestMode::draw( int segment )
12
 
{
13
 
        // turn on outside LEDs
14
 
        led_on( 9, true );
15
 
 
16
 
        // display segment number in binary across in the inside LEDs,
17
 
        // with the LED on pin 12 showing the least-significant bit
18
 
        for( int a = 0; a < 9; a++ )
19
 
                led_on( 8 - a, ( segment >> a ) & 1 );
20
 
}
21