PDA

View Full Version : Non-static edu.wpi.first.wpilibj.SolenoidBase.getAll() in Eclipse FRC plugin


Eric Wieser
01-28-2011, 12:12 PM
Hi,

There seems to be a problem with the java class library that comes packaged with the FRC Java Eclipse plugin. Logically, and according to the online documentation, the edu.wpi.first.wpilibj.SolenoidBase.getAll() method should be static. However, in the copy I have, it's clearly not.

Obvioulsy, I can get around this by creating a new Solenoid object solely for the purpose of reading this field. But this would prevent another Solenoid from being instantiated later on the same pin, wouldn't it?

Is anyone else experiencing this problem?

Thanks

wdell
01-28-2011, 12:23 PM
Someone found it a couple days ago while we were working on communications with the dashboard. A bug report was filed, and we've been informed that the fix will be in the next update.

Ryan O
01-30-2011, 03:36 PM
Last night I got an e-mail about a updated sunspotfrcsdk file (which contains the library and such) - Eclipse plug-ins have been updated to use it. Not 100% sure if that was release that was mentioned to you (I wasn't the one who updated it) but try updating the plug-ins in Eclipse, this may solve the issue.

DCRich
01-30-2011, 04:47 PM
For what it is worth --- the same error exists in the NetBeans plugins as well. The Javadocs seems to indicate that Solenoid.GetA() is static so it is rather confusing trying to dermine why the method returns this error when it should not.
Sounds as if you tracked the error back into the wpilib plugin for Eclipse.

Not clear why this fix should take so long to update. I hope that the rumor about a new update being released this weekend is correct.

Ryan O
02-02-2011, 02:52 PM
As of writing this, Eclipse has been updated to the newest sdk - which specifically says in release notes that the getAll() function is fixed. NetBeans should be updated shortly as well.

java4first
02-05-2011, 09:26 AM
I have a further question on this - we pulled down the latest Eclipse update, and it has broken everything (and still not fixed the missing static). So I'm wondering what the approved procedure (and how you test this before uploading the update to the site).

We point to the WPI Eclipse site (last night - foolishly I had everyone update their laptops at the same time, rather than trying it on one to make sure it worked), and say update, and accept the one update, etc. But then we have all kinds of problems with getting it "installed" again. We usually end up with some combination going to the preferences, changing our team number, which forces some re-compile, and then putting it back.

This latest update now runs an FRC build, but when trying to deploy, it complains about missing some version of a zip file, and saying to go to the WPI site and update. Which we do, and it comes back and says you have the latest. I'm not sitting at the lab right now, so I don't have the exact file and message, but I think it was saying it found v25 and wanted v27.

Are you supposed to re-create your workspace / project each time? Or is there some other magic set of steps to make this work?

And, just to be clear - the latest set of plugin updates is supposed to fix the static get all method?

Could you please tell me what version numbers I should see in the Eclipse about installation details listing, so I can make sure we have the right version.

Thanks!
Stu

Joe Ross
02-05-2011, 10:09 AM
This latest update now runs an FRC build, but when trying to deploy, it complains about missing some version of a zip file, and saying to go to the WPI site and update. Which we do, and it comes back and says you have the latest. I'm not sitting at the lab right now, so I don't have the exact file and message, but I think it was saying it found v25 and wanted v27.
It sounds like you did not reimage the cRIO after installing the update.

Are you supposed to re-create your workspace / project each time? Or is there some other magic set of steps to make this work?

And, just to be clear - the latest set of plugin updates is supposed to fix the static get all method?

There were two possible ways to fix the dashboard example, change the library or change the example. For whatever reason, they decided to do the latter. If you create a new dashboard example, you'll see different solenoid code that does compile. Unfortunately, any existing code is still broken, unless you change it to the same method the dashboard example is using.

This is based on my review of netbeans, there may be differences in eclipse.

derekwhite
02-06-2011, 08:51 PM
Yes, you need to replace any failing calls to Solenoid.getAll() with Solenoid.getAllFromDefaultModule().

That should have gone into the release notes...

java4first
02-08-2011, 10:11 AM
I did get this going:

(1) The re-image of the CRIO was required. After updating NetBeans to get the new image for the NI tool, it worked fine.

(2) The associated Eclipse updated didn't update the sample code for the dashboard, but if you create it in NetBeans, and then copy it to Eclipse, it has the new call correctly done.