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

  • Committer: edam
  • Date: 2012-03-23 15:56:07 UTC
  • Revision ID: tim@ed.am-20120323155607-6h8pc0c6o35nl179
switch button to no interim presses during settings mode; added NVRAM support

Show diffs side-by-side

added added

removed removed

43
43
        void set_event_times( int *event_times );
44
44
 
45
45
        /**
 
46
         * Set button press mode
 
47
         *
 
48
         * @param send_interim send interim presses during a long press?
 
49
         */
 
50
        void set_press_mode( bool send_interim );
 
51
 
 
52
        /**
46
53
         * Update internal state (call as regularly sa possible!)
47
54
         */
48
55
        void update();
67
74
 
68
75
        /** milliseconds that have been accountred for (in terms of
69
76
         * triggering events) since current state began */
70
 
        unsigned long _state_duration;
 
77
        unsigned long _state_duration_done;
71
78
 
72
79
        /** pointer to event times */
73
80
        int *_event_times;
75
82
        /** pending event */
76
83
        int _pending_event;
77
84
 
 
85
        /** send interim presses? */
 
86
        bool _send_interim;
 
87
 
 
88
        /** when not sending interim presses, ignore the next unpress */
 
89
        bool _ignore_next_unpress;
 
90
 
78
91
};
79
92
 
80
93