BrickBot / leJOS-RCX-Eclipse

Eclipse plug-ins that simplify developing Java code for the Lego MindStorms RCX using the leJOS JVM, offering easy configuration through a project wizard and a preference page, using Eclipse code building, and adding RCX-specific operations both for firmware and byte-code download.
http://lejos.org/rcx-downloads.php
0 stars 0 forks source link

org.lejos.ldt-site org.lejos_3.0.0.jar has missing tower connection entires #1

Open Torisutan opened 1 year ago

Torisutan commented 1 year ago

As the provided release file did not work, i built a new .zip from the sources. But the .jar files in the org.lejos.ldt-site are missing some entries for speaking with the IR-Tower. org.lejos.ldt.core/src/java/org/lejos/tools/eclipse/plugin/preferences/LejosPreferences.java has an array with pre-definied connections: "usb0", "usb1", "usb2", "usb3", "/dev/ttyS0", "/dev/ttyS1", "/dev/ttyS2", "/dev/ttyS3", But in my linux system the tower either works via /dev/usb/legousbtower0 or /dev/ttyUSB0. Symlinking did not work. Now I don't know how to compile the core part into a jar with the new entires as the RCXTTY or RCX_PORT Variables set in /etc/environment are ignored. How do I get the plugin to work?

My System: Arch Linux lejos_rcx compiled (and working) from the BrickBot repo openjdk version "1.8.0_382" Eclipse 2023-09 (4.29.0)

Thanks in advance

mesheets commented 1 year ago

We can certainly update LejosPreferences.java like the snippet below, but if I'm following correctly, is something else needed in addition to that? In org.lejos.ldt.core/bin/build.xml, there is a "plugin_export" target that should build just org.lejos, org.lejos.tools, and org.lejos.ldt.core if something isn't working with the broader "all" target.

private static final String[] D_PORTS_LINUX = new String[]
{
   "usb0", "usb1", "usb2", "usb3", "/dev/ttyS0", "/dev/ttyS1", "/dev/ttyS2", "/dev/ttyS3", "/dev/ttyUSB0", "/dev/ttyUSB1", "/dev/ttyUSB2"
};
Torisutan commented 1 year ago

Thanks for the fast reply. I actually tried that buildfile before but I had the following:

Buildfile: /home/.../leJOS-RCX-Eclipse/org.lejos.ldt.core/bin/build.xml

prepare:

plugin.doc:

feature_export:

site_export:

plugin_export:

BUILD FAILED
/home/.../leJOS-RCX-Eclipse/org.lejos.ldt.core/bin/build.xml:21: Problem: failed to create task or type pde.exportPlugins
Cause: The name is undefined.

So if you could add /dev/usb/legousbtower0 and /dev/ttyUSBX.

mesheets commented 1 year ago

The "pde.exportPlugins" task seems like it is something more general to Eclipse than it is something that is specific to any of these Lego MindStorms RCX projects. Might either of the following links seem pertinent? Perhaps something has changed in the Eclipse environment since this particular project was last modified and built?