/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-03-21 20:35:28 UTC
  • Revision ID: tim@ed.am-20120321203528-wfhpych1tub75rgj
fixed bug initialising text services on mode activation

Show diffs side-by-side

added added

removed removed

126
126
// activate the current minor mode
127
127
void activate_minor_mode()
128
128
{
 
129
        // reset text
 
130
        Text::reset();
 
131
        leds_off();
 
132
 
 
133
        // give the mode a chance to init
129
134
        switch( _minor_mode ) {
130
135
        case ANALOGUE_CLOCK_IDX: analogue_clock_activate(); break;
131
136
        case DIGITAL_CLOCK_IDX: digital_clock_activate(); break;
132
137
        }
133
 
 
134
 
        // reset text
135
 
        Text::reset();
136
 
        leds_off();
137
138
}
138
139
 
139
140
 
140
141
// activate major mode
141
142
void activate_major_mode()
142
143
{
 
144
        // reset text
 
145
        Text::reset();
 
146
        leds_off();
 
147
 
 
148
        // give the mode a chance to init
143
149
        switch( _major_mode ) {
144
150
        case MAIN_MODE_IDX: activate_minor_mode(); break;
145
151
        case SETTINGS_MODE_IDX: settings_mode_activate(); break;
146
152
        }
147
 
 
148
 
        // reset text
149
 
        Text::reset();
150
 
        leds_off();
151
153
}
152
154
 
153
155