/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/text_renderer.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

Lines of Context:
25
25
#include "Arduino.h"
26
26
#include <avr/pgmspace.h>
27
27
#include "common.h"
28
 
#include "nvram.h"
29
28
 
30
29
 
31
30
// cached glyph
351
350
}
352
351
 
353
352
 
354
 
void TextRenderer::init()
355
 
{
356
 
        Nvram::load( Nvram::NVRAM_FONT, _font );
357
 
        if( _font < 0 || _font >= 4 ) _font = 0;
358
 
}
359
 
 
360
 
 
361
353
int TextRenderer::get_width( int message_len )
362
354
{
363
355
        return message_len * 8 * TEXT_SCALE;
435
427
{
436
428
        if( ++_font >= 4 )
437
429
                _font = 0;
438
 
        Nvram::save( Nvram::NVRAM_FONT, _font );
439
430
}