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

  • Committer: Tim Marston
  • Date: 2012-03-10 01:25:02 UTC
  • Revision ID: tim@ed.am-20120310012502-v0jwfjghpp63un6n
removed time singleton, not cause it saved much space, but cause i don't want singletons in this project!

Show diffs side-by-side

added added

removed removed

78
78
 
79
79
void analogue_clock_draw_reset()
80
80
{
81
 
        Time &time = Time::get_instance();
82
 
 
83
81
        // calculate hand locations
84
 
        _hour_segment = ( time.get_hours() % 12 ) * 5 * NUM_SECOND_SEGMENTS +
85
 
                ( 5 * NUM_SECOND_SEGMENTS * time.get_minutes() / 60 );
86
 
        _minute_segment = time.get_minutes() * NUM_SECOND_SEGMENTS +
87
 
                ( NUM_SECOND_SEGMENTS * time.get_seconds() / 60 );
88
 
        _second_segment = time.get_seconds() * NUM_SECOND_SEGMENTS;
 
82
        _hour_segment = ( Time::get_hours() % 12 ) * 5 * NUM_SECOND_SEGMENTS +
 
83
                ( 5 * NUM_SECOND_SEGMENTS * Time::get_minutes() / 60 );
 
84
        _minute_segment = Time::get_minutes() * NUM_SECOND_SEGMENTS +
 
85
                ( NUM_SECOND_SEGMENTS * Time::get_seconds() / 60 );
 
86
        _second_segment = Time::get_seconds() * NUM_SECOND_SEGMENTS;
89
87
}