/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: 2012-05-17 22:49:36 UTC
  • Revision ID: tim@ed.am-20120517224936-0wgyem932dlq5bs4
various tweaks, a (failed) attempt to fix text reset bug and added TODO

Show diffs side-by-side

added added

removed removed

24
24
#define _INFO_MODE_H_
25
25
 
26
26
 
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
 
};
 
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();
62
48
 
63
49
 
64
50
#endif //_INFO_MODE_H_