Patch to remove extra dependencies in addon package

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

Patch to remove extra dependencies in addon package

Postby positron96 » Sat Jul 27, 2013 8:28 am

Hello. I believe there are some unneeded dependencies in lejos.nxt.addon package. Specifically, many of classes use SensorPort class when they only need I2CPort interface. Came across this while trying to build android library to control several NXTs at once.

I've created a patch to replace SensorPort usage with I2CPort (and some minor code cleanup), attaching it here. This change will be useful when for remote controlling as all addon classes now could be created with RemoteSensorPort instance, not with SensorPort instance (They both implement I2CPort). The patch is created for release 0.9.1-beta3

http://pastebin.com/bZsWezTD
positron96
New User
 
Posts: 21
Joined: Fri Jun 29, 2012 11:55 am

Re: Patch to remove extra dependencies in addon package

Postby skoehler » Mon Jul 29, 2013 7:55 am

Done. https://sourceforge.net/p/lejos/code/6960/

BTW: the patch didn't cleanly apply to trunk. Directory structure was different (src instead of src_shared) and some files (like NXTMMX) had changed in trunk.
skoehler
leJOS Team Member
 
Posts: 1390
Joined: Thu Oct 30, 2008 4:54 pm

Re: Patch to remove extra dependencies in addon package

Postby positron96 » Mon Jul 29, 2013 8:21 am

Yep, I was using 0.9.1-3 source which is a year old) Going to use dev snapshot in the future.
positron96
New User
 
Posts: 21
Joined: Fri Jun 29, 2012 11:55 am


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff