27
27
#include "Arduino.h"
30
void InfoMode::draw( int segment )
31
static int _flavour = 0;
34
static void reset_messages()
39
Text::reset_message( 0, Text::MODE_TOP | Text::MODE_THREEQUARTERS );
42
Text::reset_message( 0, Text::MODE_TOP | Text::MODE_HALF );
43
Text::reset_message( 1, Text::MODE_BOTTOM | Text::MODE_HALF );
49
void info_mode_press()
59
void info_mode_draw( int segment )
32
61
Text::draw( 0, segment );
33
62
if( _flavour == 1 )
38
void InfoMode::draw_reset()
67
void info_mode_draw_reset()
69
PString str0( Text::_messages[ 0 ], MESSAGE_LEN );
70
PString str1( Text::_messages[ 1 ], MESSAGE_LEN );
43
PString str0( Text::_messages[ 0 ], MESSAGE_LEN * 4 );
46
"Propeller Clock mk.1 ... "
47
"Created by Tim and Dan Marston in 2012 ... "
48
"http://ed.am/dev/elec/propeller-clock" );
49
Text::set_message( 0, str0 );
78
"Propeller Clock mk.1 ... "
79
"Created by Tim and Dan Marston in 2011 ... "
80
"http://ed.am/dev/elec/propeller-clock" );
53
PString str0( Text::_messages[ 0 ], MESSAGE_LEN );
54
PString str1( Text::_messages[ 1 ], MESSAGE_LEN );
58
unsigned long millis = ::millis();
60
(unsigned long)60 * 1000 / ( millis - _millis_last ) );
61
_millis_last = millis;
62
Text::set_message( 0, str0 );
63
Text::set_message( 1, str1 );
84
str1.format( "%d", 123 );
88
Text::set_message( 0, str0 );
89
Text::set_message( 1, str1 );
70
void InfoMode::activate()
93
void info_mode_activate()
73
_millis_last = ::millis();
79
void InfoMode::press()
88
void InfoMode::reset_messages()
93
Text::reset_message( 0, Text::MODE_TOP | Text::MODE_THREEQUARTERS |
94
Text::MODE_HSCROLL, Text::SCALE_SMALL );
97
Text::reset_message( 0, Text::MODE_TOP | Text::MODE_HALF,
99
Text::reset_message( 1, Text::MODE_BOTTOM | Text::MODE_HALF,