/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/propeller-clock.cc

  • 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

Lines of Context:
113
113
static int _major_mode = 0;
114
114
static int _minor_mode = 0;
115
115
 
116
 
#define MAIN_MODE_IDX 1
117
 
#define SETTINGS_MODE_IDX 0
 
116
#define SETTINGS_MODE_IDX 1
 
117
#define MAIN_MODE_IDX 0
118
118
 
119
119
#define ANALOGUE_CLOCK_IDX 0
120
120
#define DIGITAL_CLOCK_IDX 1
121
 
#define TEST_PATTERN_IDX 2
122
 
#define INFO_MODE_IDX 3
 
121
#define INFO_MODE_IDX 2
 
122
#define TEST_PATTERN_IDX 3
123
123
 
124
124
//_____________________________________________________________________________
125
125
//                                                                         code
185
185
                        // long press
186
186
                        switch( _major_mode ) {
187
187
                        case MAIN_MODE_IDX:
188
 
                                if( ++_minor_mode >= 3 )
 
188
                                if( ++_minor_mode >= 4 )
189
189
                                        _minor_mode = 0;
190
190
                                activate_minor_mode();
191
191
                                break;
248
248
                break;
249
249
        case SETTINGS_MODE_IDX: settings_mode_draw( segment ); break;
250
250
        }
 
251
        Text::post_draw();
251
252
 
252
253
        // draw any text that was rendered
253
254
        TextRenderer::output_buffer();