20
20
* You should have received a copy of the GNU Lesser General Public License
21
21
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23
#ifndef _ANALOGUE_CLOCK_MODE_H_
24
#define _ANALOGUE_CLOCK_MODE_H_
30
class AnalogueClockMode : public Mode
35
* Called once per segment to draw a column of LEDs.
37
* @param segment the segment number to draw
39
void draw( int segment );
42
* Called at the start of a "frame", before any segments are drawn.
47
* Called when the mode is becoming active.
52
* Called when the button has been pressed.
58
/** the segment that the hour hand should be at */
61
/** the segment that the minute hand should be at */
64
/** the segment that the second hand should be at */
67
/** the segment that the subsecond hand should be at */
68
int _subsecond_segment;
73
/** number of elapsed milliseconds this second */
74
unsigned long _second_millis;
78
#endif //_ANALOGUE_CLOCK_MODE_H_
23
#ifndef _ANALOGUE_CLOCK_H_
24
#define _ANALOGUE_CLOCK_H_
28
* Called to inform the mode that there has been a (short) button press.
30
extern void analogue_clock_press();
33
* Draw an individual segment (column of pixels)
35
* @param segment the segment number
37
extern void analogue_clock_draw( int segment );
40
* Called before the first segment is drawn, once per "frame".
42
extern void analogue_clock_draw_reset();
45
#endif //_ANALOGUE_CLOCK_H_