/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/modes/settings_mode.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:
28
28
#include "common.h"
29
29
 
30
30
 
31
 
#define TIME_SET_IDX 0
32
 
#define DATE_SET_IDX 1
33
 
#define FONT_SET_IDX 2
 
31
#define FONT_SET_IDX 0
 
32
#define TIME_SET_IDX 1
 
33
#define DATE_SET_IDX 2
34
34
 
35
35
 
36
36
// item we're setting
42
42
{
43
43
        switch( _item )
44
44
        {
45
 
/*      case TIME_SET_IDX:
 
45
        case TIME_SET_IDX:
46
46
                switch( _part ) {
47
47
                case 0: Time::inc_hours(); break;
48
48
                case 1: Time::inc_minutes(); break;
55
55
                case 1: Time::inc_month(); break;
56
56
                case 2: Time::inc_day(); break;
57
57
                }
58
 
                break;*/
 
58
                break;
59
59
        case FONT_SET_IDX:
60
60
                TextRenderer::inc_font();
61
61
                break;
62
62
        }
63
63
}
64
64
 
65
 
 
66
65
static void reset_messages()
67
66
{
68
67
        Text::reset_message( 0, Text::MODE_TOP | Text::MODE_ALL );
105
104
        switch( _item ) {
106
105
        case TIME_SET_IDX:
107
106
                if( _part == 0 && flash )
108
 
                        str0.print( "  " );
 
107
                        str0.print( ( Time::get_hours() % 12 ) < 10? " " : "  " );
109
108
                else
110
 
                        str0.format( "%2d", Time::get_hours() % 12 );
 
109
                        str0.format( "%d", Time::get_hours() % 12 );
111
110
                str0.print( ':' );
112
111
                if( _part == 1 && flash )
113
112
                        str0.print( "  " );
118
117
                        str0.print( "  " );
119
118
                else
120
119
                        str0.format( "%02d", Time::get_seconds() );
 
120
                str0.print( ' ' );
121
121
                if( _part == 0 && flash )
122
122
                        str0.print( "  " );
123
123
                else