/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/drawer.cc

  • Committer: edam
  • Date: 2012-03-03 10:06:31 UTC
  • Revision ID: edam@waxworlds.org-20120303100631-ae3idks1703vdm05
widenned clock hands, tweaked scales, got top & bottom text modes working

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
void Drawer::draw_reset()
28
28
{
29
29
}
30
 
 
31
 
 
32
 
void Drawer::led_on( int led, bool on )
33
 
{
34
 
        if( led < 0 || led > 9 ) return;
35
 
 
36
 
        // convert to pin no.
37
 
        led += 4;
38
 
 
39
 
        // pin 4 needs to be inverted (it's driving a PNP)
40
 
        if( led == 4 ) on = !on;
41
 
 
42
 
        digitalWrite( led, on? HIGH : LOW );
43
 
}