/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: Tim Marston
  • Date: 2012-05-18 14:40:04 UTC
  • Revision ID: tim@ed.am-20120518144004-uuz2zrjmyr78wqd5
updated emacs compile command and readjusted clock shift

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
         */
62
62
        int get_event();
63
63
 
64
 
        /**
65
 
         * Get the current button state.
66
 
         *
67
 
         * @return true if the button is pressed
68
 
         */
69
 
        bool get_state();
70
 
 
71
64
protected:
72
65
 
73
66
        /** pin */
74
67
        int _pin;
75
68
 
76
 
        /** last real state */
77
 
        bool _last_real_state;
78
 
 
79
 
        /** time when the real state began */
80
 
        unsigned long _millis_real_state;
81
 
 
82
 
        /** accepted state */
83
 
        bool _state;
84
 
 
85
 
        /** time when the accepted state began */
 
69
        /** last state */
 
70
        bool _state_last;
 
71
 
 
72
        /** time when this state began */
86
73
        unsigned long _millis_state;
87
74
 
88
75
        /** amount of time that we've already triggered events for this press */
93
80
 
94
81
        /** pending event */
95
82
        int _pending_event;
 
83
 
 
84
        /** an interim event buffer */
 
85
        int _interim_event;
 
86
 
 
87
        /** send interim events? */
 
88
        bool _send_interim;
 
89
 
 
90
        /** when not sending interim events, ignore the next unpress */
 
91
        bool _ignore_next_unpress;
 
92
 
96
93
};
97
94
 
98
95