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

  • Committer: Tim Marston
  • Date: 2012-05-18 18:29:50 UTC
  • Revision ID: tim@ed.am-20120518182950-t85bn9a21n72uzm8
text messages are now individually enabled and draw()n automatically

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "Arduino.h"
29
29
 
30
30
 
31
 
void DigitalClockMode::draw( int segment )
32
 
{
33
 
        Text::draw( 0, segment );
34
 
        Text::draw( 1, segment );
35
 
}
36
 
 
37
 
 
38
31
void DigitalClockMode::draw_reset()
39
32
{
40
33
        PString str0( Text::_messages[ 0 ], MESSAGE_LEN * 4 );
55
48
                break;
56
49
        }
57
50
 
58
 
        Text::set_message( 0, str0 );
 
51
        Text::set_message_text( 0, str0 );
59
52
}
60
53
 
61
54
 
78
71
 
79
72
void DigitalClockMode::reset_messages()
80
73
{
 
74
        Text::reset();
 
75
 
81
76
        switch( _flavour )
82
77
        {
83
78
        case 0:
84
 
                Text::reset_message( 0, Text::MODE_TOP | Text::MODE_ALL,
85
 
                                Text::SCALE_FAT);
 
79
                Text::set_up_message( 0, Text::MODE_TOP | Text::MODE_ALL,
 
80
                                Text::SCALE_FAT );
86
81
                break;
87
82
        case 1:
88
 
                Text::reset_message( 0, Text::MODE_HSCROLL | Text::MODE_TOP |
 
83
                Text::set_up_message( 0, Text::MODE_HSCROLL | Text::MODE_TOP |
89
84
                                Text::MODE_THREEQUARTERS );
90
85
                break;
91
86
        }