/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-17 19:17:05 UTC
  • Revision ID: tim@ed.am-20120517191705-3d28d50tw8w51v7g
- renamed database to connection to better identify what it is (would database_connection be better though?)
- moved basic_statement and basic_transaction to sqlite::detail
- made sqlite::threadsafe() return the threading mode int, not a bool
- renamed row::index() to row_number() so it isn't confused with column index
- added typedef for deferred_transaction
- added early rollback method to transaction_guard
- allowed transaction_guard::~transaction_guard() to throw exceptions, since when it needs to, we're really screwed anyway
- bugfix: query::reset() didn't reset the internal row counter
- added query::num_results()
- added docs/design-notes
- reimplemented query::iterator so that increment() (which performs a step() on the query) now caches the returned row to be returned during dereference() (previously it stashed details and returned new row!?)
- bugfix: resetting active queries during rollbacks would hang!'s what we should be using and out seperate
regulator is only working around a fault in out arduino

Show diffs side-by-side

added added

removed removed

66
66
        /** pin */
67
67
        int _pin;
68
68
 
69
 
        /** last state */
70
 
        bool _state_last;
71
 
 
72
 
        /** time when this state began */
73
 
        unsigned long _millis_state;
74
 
 
75
 
        /** amount of time that we've already triggered events for this press */
76
 
        unsigned long _millis_done;
 
69
        /** current state */
 
70
        bool _state;
 
71
 
 
72
        /** time when current state began */
 
73
        unsigned long _state_millis;
 
74
 
 
75
        /** milliseconds that have been accountred for (in terms of
 
76
         * triggering events) since current state began */
 
77
        unsigned long _state_duration_done;
77
78
 
78
79
        /** pointer to event times */
79
80
        int *_event_times;
81
82
        /** pending event */
82
83
        int _pending_event;
83
84
 
84
 
        /** an interim event buffer */
85
 
        int _interim_event;
86
 
 
87
 
        /** send interim events? */
 
85
        /** send interim presses? */
88
86
        bool _send_interim;
89
87
 
90
 
        /** when not sending interim events, ignore the next unpress */
 
88
        /** when not sending interim presses, ignore the next unpress */
91
89
        bool _ignore_next_unpress;
92
90
 
93
91
};