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

  • Committer: edam
  • Date: 2012-02-25 14:54:33 UTC
  • Revision ID: edam@waxworlds.org-20120225145433-kih8qs45x05cum46
removed Bounce library and updated/fixed new code

Show diffs side-by-side

added added

removed removed

21
21
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
22
 */
23
23
#include "test_mode.h"
24
 
#include "display.h"
25
24
 
26
25
 
27
26
TestMode::TestMode()
34
33
void TestMode::draw( int segment )
35
34
{
36
35
        // turn on outside LEDs
37
 
        Display::led( 9, true );
 
36
        led_on( 9, true );
38
37
 
39
38
        // display segment number in binary across in the inside LEDs,
40
39
        // with the LED on pin 12 showing the least-significant bit
41
40
        for( int a = 0; a < 9; a++ )
42
 
                Display::led( 8 - a, ( segment >> a ) & 1 );
 
41
                led_on( 8 - a, ( segment >> a ) & 1 );
43
42
}
44
43