/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-23 20:18:22 UTC
  • Revision ID: edam@waxworlds.org-20120223201822-dno5n4fwvd35izq9
changed 12-tick to a double tick, added CLOCK_SHIFT to align face and fixed hour-hand

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