Tripurari,

seems you have detected a bug indeed...sigh!

Both RCXPort constructors turn out to boil down to opening the tower in the handlers without the "tty" variable set internally (as a matter of fact, in the according source code I detected "// TODO rework this" comments...GREAT! So much for breaking functionality in Open Source projects by committing broken code and running away...).
Aaargh! *pulling my hair*

As a result, the tower is assumed to be a serial tower by default; obviously, that fails on Windows for an USB tower.

I'm going to fix that by removing Tower's error-prone default constructor and adapting the handlers.

Thanks for hinting that bug.

We are urgently in need for more integration tests, I take it.
And no doubt for some kind of QA process between releases.

Regards,
 Matthias Paul


Matthias Paul Scholz schrieb:

Tripurari,

I've tried running the outstream example with leJOS 3.0 on Linux, and it worked for me.

These were the steps I performed:

1. switch to examples/comms/outstream
2. lejosjc Write.java
3. lejoslink -o Write.bin Write
4. lejosdl Write.bin
5. export CLASSPATH=.:$CLASSPATH:$LEJOS_HOME/lib/pcrcxcomm.jar
6. javac Read.java
7. export THIRDPARTY_LIBS="$LEJOS_HOME/3rdparty/lib"
8. java -Djava.library.path=$LEJOS_HOME/bin -classpath .:$THIRDPARTY_LIBS/commons-cli-1.0.jar:$LEJOS_HOME/lib/jtools.jar:$LEJOS_HOME/lib/pcrcxcomm.jar

Will try it Windows XP also.

Cheers,
  Matthias

Matthias Paul Scholz wrote:



Tripurari Volpe wrote:

Well, I finally got the sample outstream stuff to compile and run (sorta)... but now I have a new problem.

I compile and run the sample program samples/comms/outstream/Read.java, and run it on my PC. It works, up to a point. Specifically, when it tries to create a new RCXPort, it runs into a TowerException informing me of a "write failure"...

[...]


I apologize for bothering this list so much, but I have a project that I need to finish very soon, and this link between the PC and the RCX is the last hurdle, that has proven to be an incredibly frustrating difficulty... All I want to do is pass some data from the RCX to the PC, for gosh sakes! :-)



Well, this is most decidedly a justified request.
I'll have a look into that matter (squares with my efforts in getting a release candidate out for leJOS 3.0 in the next couple of weeks).



P.S: Incidentally, I notice that there's a second constructor for RCXPort, taking a string argument "port"... The API documentation says nothing - what exactly does this constructor do? Might it be helpful to me right now?



Wasn't the author of the comm layer, but as far as I can see from the RCX(Abstract)Port's class source code, the port argument is simply .. ignored. Hence I don't know what's the use of this constructor at all (was maybe some compatibility issue).


P.P.S: I gave the lower-level Tower class a try, and that actually worked, though a bit awkardly. I think I could manage to put together what I need with just this, but if Tower works, why doesn't RCXPort...?



As a matter of fact, I'd like to know also. Let's see.

Cheers,
/M





-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion

Reply via email to