/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 19:17:05 UTC
  • Revision ID: tim@ed.am-20120517191705-3d28d50tw8w51v7g
removed 5V regulator from scematic and replaced the connection to the regulator
on the Arduino -- ecause that'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

Lines of Context:
113
113
static int _major_mode = 0;
114
114
static int _minor_mode = 0;
115
115
 
116
 
#define SETTINGS_MODE_IDX 1
117
 
#define MAIN_MODE_IDX 0
 
116
#define MAIN_MODE_IDX 1
 
117
#define SETTINGS_MODE_IDX 0
118
118
 
119
119
#define ANALOGUE_CLOCK_IDX 0
120
120
#define DIGITAL_CLOCK_IDX 1
121
 
#define INFO_MODE_IDX 2
122
 
#define TEST_PATTERN_IDX 3
 
121
#define TEST_PATTERN_IDX 2
 
122
#define INFO_MODE_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 >= 4 )
 
188
                                if( ++_minor_mode >= 3 )
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();
252
251
 
253
252
        // draw any text that was rendered
254
253
        TextRenderer::output_buffer();