/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.h

  • 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
 
 
2
 
class Drawer
3
 
{
4
 
public:
5
 
 
6
 
        /**
7
 
         * Draw an individual segment (column of pixels)
8
 
         *
9
 
         * @param segment the segment number
10
 
         */
11
 
        virtual void draw( int segment ) = 0;
12
 
 
13
 
        /**
14
 
         * Called before the first segment is drawn, once per "frame".
15
 
         */
16
 
        virtual void draw_reset();
17
 
 
18
 
protected:
19
 
 
20
 
        /**
21
 
         * Turn on/off an LED
22
 
         *
23
 
         * @param led index of the LED (0 to 9)
24
 
         * @param on true to turn on, false to turn off
25
 
         */
26
 
        void led_on( int led, bool on );
27
 
 
28
 
};