|
For some silly reason, I was browsing through the BrickOS code and I noticed
this:
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);
}
Is that right, or has a problem already been found and corrected, here?
Problem: what if (dir==brake)?
I think only the right LCD arrow comes on. There should be no "else". The 2nd
to last line should start with 'if' not 'else if'
It's the same for all the motor functions
Steve
|
|
Message has 1 Reply: | | Re: Motor Display
|
| (...) This problem has been fixed in the most recent CVS source file (dmotor.c), but as far as I can tell it hasn't been part of an offical release yet: (URL) (21 years ago, 5-Jan-04, to lugnet.robotics.rcx.legos)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|