To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3007
3006  |  3008
Subject: 
Motor LCD arrows bug
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 4 Dec 2002 19:50:48 GMT
Viewed: 
3180 times
  
In BrickOS 0.2.6.08, there's a minor bug where the LCD arrows
misbehave when the motor direction is set to brake.  I believe
the intention is to turn both direction arrows on when the output
is in the brake state.  However, what happens is that only one of
the arrows is turned on.  This is easy to duplicate by using the
Lego remote control since it brakes the motors when you release
the motor buttons.

Currently, the code for motor A reads as follows:

void motor_a_dir(MotorDirection dir)
{
  dm_a.dir = dm_a_pattern[dir];
  dlcd_hide(LCD_A_LEFT);
  dlcd_hide(LCD_A_RIGHT);
  if (dir == fwd || dir == brake)
    dlcd_show(LCD_A_RIGHT);
  else if (dir == rev || dir == brake)
    dlcd_show(LCD_A_LEFT);
}

Just remove the "else" in each of the motor functions and everything
should work fine!

Mark



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR