View Single Post
  #9   Spotlight this post!  
Unread 21-04-2010, 23:03
michael714's Avatar
michael714 michael714 is offline
Registered User
FRC #3863 (Pantherbotics)
Team Role: Teacher
 
Join Date: Apr 2006
Rookie Year: 2007
Location: Newbury Park, CA
Posts: 46
michael714 is on a distinguished road
Re: What was the hardest to program this year in Java?

One thing that frustrated us was the 21 character limit for the User Message box in the Dashboard DriverStationLCD. I know that it's a holdover from the old system, but it would have been nice to be able to change that limit for the new driver station LCD. After reading the posts here, it sounds like it might have been possible to write a new class to override the limit, but as relatively beginner Java programmers, it was not entirely obvious.

Another bummer was the DefaultCode template. The Timer.delay() routine was not as useful as we thought it would be. We needed delays because of how our pneumatic kicker was designed, but we wanted the teleop periodic to keep looping as well. Timer.delay() did not allow that to happen. Eventually, we learned that we should have put our pneumatic code into a thread that is separate from our joystick read and motor control. But working with threads will be something new for our team. It would be nice to have a sample routine with some task in its own thread.

It wasn't very friendly that the DefaultCode template tells you that you should not use it. We understood not to use it as-is, but the comment at the beginning of the template was a bit offputting. A bit more commenting throughout would also be helpful- I'm going to send my suggestions to the folks at WPI. One specific point was the disable mode. Didn't understand when and how it could be used until shortly before the competition. Finally discovered that it allowed us to use the driver station to set our autonomous mode and that was very helpful.

Not directly related to Java, the Driver Station update process was frustrating. The deal about having to install, then uninstall, then reinstall was frustrating. And somehow we downloaded what we thought was the latest update, but when we got to the competition, we were told that it was not the latest update. They point to a date on the dashboard, but this indication was not described in any readme or release notes for the driver station update.

We did most of our debugging via System.out.println statements, but it seemed like occasionally those statements directly interfered with other code- no specific example at this time. Just curious if anyone else noticed that.

The WPIlib user guide for Java was not complete and so there were some things we wanted to know but were not described in the document.

When we tried to receive data from the NXT Magnetic Compass, we received an error message along the lines of "Invalid Manufacturer." Not sure if that was a Java problem or something else.

Had some problems getting digital inputs to show up on the dashboard using the Dashboard example code. The analog inputs showed up fine, but not the digital inputs.

Not sure why writing data to the DriverStationLCD was so time consuming, but we experienced that and noticed that others have made posts about it as well.

Things that we loved:

- The gyro class worked quite smoothly
- Being able to set autonomous mode via disabled mode was cool
- The Java was much easier to work with than Labview for those of us who have written code using text for years
- It was quite easy to implement holonomic drive code and it was beautiful to see the result
- Although I have my complaints about the DefaultCode template, in the end, we did write code that worked and we did implement our first successful autonomous code in 4 years (scored a goal in autonomous from the middle zone!)

Last edited by michael714 : 21-04-2010 at 23:33.
Reply With Quote