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

  • Committer: Tim Marston
  • Date: 2013-03-31 17:07:36 UTC
  • Revision ID: tim@ed.am-20130331170736-hphm2hg0y6l7w6z1
made rtc-test's DS1307 library a symlink to the main one in src/util

Show diffs side-by-side

added added

removed removed

24
24
#define _INFO_MODE_H_
25
25
 
26
26
 
27
 
/**
28
 
 * Called to inform the mode that there has been a (short) button press.
29
 
 */
30
 
extern void info_mode_press();
31
 
 
32
 
/**
33
 
 * Draw an individual segment (column of pixels)
34
 
 *
35
 
 * @param segment the segment number
36
 
 */
37
 
extern void info_mode_draw( int segment );
38
 
 
39
 
/**
40
 
 * Called before the first segment is drawn, once per "frame".
41
 
 */
42
 
extern void info_mode_draw_reset();
43
 
 
44
 
/**
45
 
 * Called when this minor mode becomes active
46
 
 */
47
 
extern void info_mode_activate();
 
27
#include "mode.h"
 
28
 
 
29
 
 
30
class InfoMode : public Mode
 
31
{
 
32
public:
 
33
 
 
34
        /**
 
35
         * Called at the start of a "frame", before any segments are drawn.
 
36
         */
 
37
        void draw_reset();
 
38
 
 
39
        /**
 
40
         * Called when the mode is becoming active.
 
41
         */
 
42
        void activate();
 
43
 
 
44
        /**
 
45
         * Called when the button has been pressed.
 
46
         */
 
47
        void press();
 
48
 
 
49
private:
 
50
 
 
51
        /**
 
52
         * Set up message buffers
 
53
         */
 
54
        void reset_messages();
 
55
 
 
56
        /** display flavour */
 
57
        int _flavour;
 
58
 
 
59
        /** previous millis */
 
60
        unsigned long _millis_last;
 
61
};
48
62
 
49
63
 
50
64
#endif //_INFO_MODE_H_