/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/settings_mode.cc

  • Committer: Tim Marston
  • Date: 2012-03-21 21:24:17 UTC
  • Revision ID: tim@ed.am-20120321212417-dnba5l1oheddeyxw
fixed time centring and display in settings mode

Show diffs side-by-side

added added

removed removed

104
104
        switch( _item ) {
105
105
        case TIME_SET_IDX:
106
106
                if( _part == 0 && flash )
107
 
                        str0.print( "  " );
 
107
                        str0.print( ( Time::get_hours() % 12 ) < 10? " " : "  " );
108
108
                else
109
 
                        str0.format( "%2d", Time::get_hours() % 12 );
 
109
                        str0.format( "%d", Time::get_hours() % 12 );
110
110
                str0.print( ':' );
111
111
                if( _part == 1 && flash )
112
112
                        str0.print( "  " );
117
117
                        str0.print( "  " );
118
118
                else
119
119
                        str0.format( "%02d", Time::get_seconds() );
 
120
                str0.print( ' ' );
120
121
                if( _part == 0 && flash )
121
122
                        str0.print( "  " );
122
123
                else