Subject:
|
NQC RCXLib bug & wish
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Mon, 21 Feb 2000 20:37:53 GMT
|
Viewed:
|
1924 times
|
| |
| |
Hi! (especially Dave)
While trying to get a working communication channel between the PC and the RCX
with the original firmware, I discovered a bug in RCXLib: in RCX_Link,
BuildTxData, the 3rd bit in the command code is toggled when sending the same
command several times in a row. This is fine, but the problem is that
the kRCX_Message command (0xF7) does not need that! The correction is simple:
if ((byte==fTxLastCommand) && (fTxLastCommand != kRCX_Message)) byte ^=8;
Another note. There is no easy way to get replies from the RCX, in form of
messages. The simplest is to allow reading the whole buffer read from the
serial port - but access to fRxLength is needed! (either public or protected)
btw, R2.1 looks great!
regards,
Vlad
|
|
Message has 1 Reply: | | Re: NQC RCXLib bug & wish
|
| (...) I didn't realize that kRCX_Message packets wouldn't survive toggling the duplicate reduction bit. I'll fix this in the source. Actually, I think rather than hard-coding the decision with kRCX_Message, I'll make it dependent on whether retries (...) (25 years ago, 22-Feb-00, to lugnet.robotics.rcx.nqc)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|