Go to Post I'm still trying to find a way to get FIRST to dump the Chicken Dance song. :p - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-01-2011, 22:31
DCRich DCRich is offline
Mentor
FRC #2180 (Zero Gravity)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2006
Location: Steinert H.S., Hamilton NJ
Posts: 21
DCRich is an unknown quantity at this point
Re: Driverstation / Dashboard in JAVA

Thank you. What you show makes sense. I note that you import each sensor class separately. Is that intentional or just happenstance?

I agree with your peeve on the demo code. There was a post on the main page about test codes being posted without comments but a demo program without comments is really annoying. I once worked with a mathematician who said he did not put comments in his code because any GOOD programmer should be able to read the code & understand the algorithm.

Danny
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2011, 23:27
frasnow's Avatar
frasnow frasnow is offline
Software
no team
Team Role: Mentor
 
Join Date: Jun 2010
Rookie Year: 2010
Location: Oregon
Posts: 83
frasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to behold
Re: Driverstation / Dashboard in JAVA

The line "lowDashData.addByte(Solenoid.getAll()); // solenoid cluster" will not compile in version 2011.4. The getAll() method is no longer static. I'm really disappointed FIRST released code that breaks the example.
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2011, 09:04
wdell wdell is offline
Registered User
AKA: William Dell
FRC #3999 (Shadetree Mechanics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Killeen, Texas
Posts: 55
wdell has a spectacular aura aboutwdell has a spectacular aura about
Re: Driverstation / Dashboard in JAVA

Quote:
Originally Posted by frasnow View Post
The line "lowDashData.addByte(Solenoid.getAll()); // solenoid cluster" will not compile in version 2011.4. The getAll() method is no longer static. I'm really disappointed FIRST released code that breaks the example.
Worked for me last night

Quote:
Originally Posted by DCRich
There was a post on the main page about test codes being posted without comments but a demo program without comments is really annoying.
Yah, that was mine

I imported each sensor class separately as a teaching tool. I don't want my students to get in the habit of using wild cards and just importing everything. That's fine if you are slapping together something quickly, but I don't think it's a good practice for production level code. Also, I wasn't sure how wild cards would impact memory, so I opted for what I thought would be the lower memory model. If I'm mistaken there please correct me, as wild cards would definitely keep me from messing up because I forgot to import something.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2011, 10:06
frasnow's Avatar
frasnow frasnow is offline
Software
no team
Team Role: Mentor
 
Join Date: Jun 2010
Rookie Year: 2010
Location: Oregon
Posts: 83
frasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to behold
Re: Driverstation / Dashboard in JAVA

Quote:
Originally Posted by wdell View Post
Worked for me last night
This is an extremely unproductive response. If you'd bothered to look at which version of the plugins are installed on your system, you could at least have said "version blah works for me."

You must have 2011.3. Don't install the plugin update to 2011.4, or that line of code will break. I've looked at multiple systems.
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2011, 10:47
wdell wdell is offline
Registered User
AKA: William Dell
FRC #3999 (Shadetree Mechanics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Killeen, Texas
Posts: 55
wdell has a spectacular aura aboutwdell has a spectacular aura about
Re: Driverstation / Dashboard in JAVA

Quote:
Originally Posted by frasnow View Post
You must have 2011.3. Don't install the plugin update to 2011.4, or that line of code will break. I've looked at multiple systems.
No, I am using 2011.4. No errors, builds and loads fine.

As for the curt answer, I was going back to check and see if I could reproduce your problem, which I cannot. I have no errors and no warnings on that line, or any other line in that class. I deployed this to my test bot last night and it worked fine.
Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2011, 11:23
wdell wdell is offline
Registered User
AKA: William Dell
FRC #3999 (Shadetree Mechanics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Killeen, Texas
Posts: 55
wdell has a spectacular aura aboutwdell has a spectacular aura about
Re: Driverstation / Dashboard in JAVA

Updated the DStation class above with a cleaned up, and hopefully better commented copy. I still need to flesh out exactly what the updateDashboard method is doing, but I think I've got a handle on it now, including how to extend it. Maybe
Reply With Quote
  #7   Spotlight this post!  
Unread 26-01-2011, 13:38
wdell wdell is offline
Registered User
AKA: William Dell
FRC #3999 (Shadetree Mechanics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Killeen, Texas
Posts: 55
wdell has a spectacular aura aboutwdell has a spectacular aura about
Re: Driverstation / Dashboard in JAVA

Confirmed. I just finished running my test rig up and down the school hall (noon CST), and the DStation code performed as expected. Sorry frasnow, I'm not sure why it's not working for you, but no problems here.
Reply With Quote
  #8   Spotlight this post!  
Unread 26-01-2011, 22:02
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: Driverstation / Dashboard in JAVA

I just started making my own Dashboard in Java and am skipping the protocol they designed entirely (and having the cRIO send stuff with SocketConnection). To be honest, the current system is too much of a pain to consider using.
Reply With Quote
  #9   Spotlight this post!  
Unread 26-01-2011, 22:21
frasnow's Avatar
frasnow frasnow is offline
Software
no team
Team Role: Mentor
 
Join Date: Jun 2010
Rookie Year: 2010
Location: Oregon
Posts: 83
frasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to behold
Re: Driverstation / Dashboard in JAVA

Quote:
Originally Posted by wdell View Post
Confirmed. I just finished running my test rig up and down the school hall (noon CST), and the DStation code performed as expected. Sorry frasnow, I'm not sure why it's not working for you, but no problems here.
It's so strange that 2011.4 works on your system, but none of the 4 systems I've tried.

Today I tried this:
1. Uninstalled all the FRC plugins from Netbeans.
2. Installed what is called version 4.8 on FIRST forge (version 2011.3). With this configuration Solenoid.getAll() is fine and is even declared Static as it should be.
3. Uninstalled version 4.8 from FIRST forge and downloaded & installed version 4.9 (version 2011.4). I get the Solenoid.getAll() is non-static error. Looking in the code, it is indeed not declared as static.

All my other systems are using the automatic updates. I just can't understand how your 2011.4 is different from the one on all my systems. It's not an OS problem; I've used Windows 7, Windows XP, Mac OSX, and Linux. It's not a Netbeans version problem; I've tried 6.7, 6.8 and 6.9.1.
Reply With Quote
  #10   Spotlight this post!  
Unread 27-01-2011, 08:53
wdell wdell is offline
Registered User
AKA: William Dell
FRC #3999 (Shadetree Mechanics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Killeen, Texas
Posts: 55
wdell has a spectacular aura aboutwdell has a spectacular aura about
Re: Driverstation / Dashboard in JAVA

Quote:
Originally Posted by frasnow View Post
I just can't understand how your 2011.4 is different from the one on all my systems. It's not an OS problem; I've used Windows 7, Windows XP, Mac OSX, and Linux. It's not a Netbeans version problem; I've tried 6.7, 6.8 and 6.9.1.
hmm. I'm using Netbeans 7.0 beta, but that shouldn't make any kind of difference.

You could try replacing the solenoid line with:

Code:
byte thisBytes = 0;
lowDashData.addByte(thisBytes);
Basically forcing the solenoids to always be zeroed.
Reply With Quote
  #11   Spotlight this post!  
Unread 27-01-2011, 08:55
wdell wdell is offline
Registered User
AKA: William Dell
FRC #3999 (Shadetree Mechanics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Killeen, Texas
Posts: 55
wdell has a spectacular aura aboutwdell has a spectacular aura about
Re: Driverstation / Dashboard in JAVA

I've just checked using Eclipse, and the error you have is showing up there. I have no idea why it works when I use Netbeans. I may have to actually hunt down where the libraries are stored on my disk and physically delete them, then re-update.
Reply With Quote
  #12   Spotlight this post!  
Unread 27-01-2011, 09:45
frasnow's Avatar
frasnow frasnow is offline
Software
no team
Team Role: Mentor
 
Join Date: Jun 2010
Rookie Year: 2010
Location: Oregon
Posts: 83
frasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to beholdfrasnow is a splendid one to behold
Re: Driverstation / Dashboard in JAVA

Quote:
Originally Posted by wdell View Post
I've just checked using Eclipse, and the error you have is showing up there. I have no idea why it works when I use Netbeans. I may have to actually hunt down where the libraries are stored on my disk and physically delete them, then re-update.
Wow! I really appreciate your tenacity in trying to reproduce my problem. Hopefully FIRST will fix it soon. I was so astounded by them breaking the example code that I tried to send a message to Derek White at Oracle. He's listed on FIRST Forge as one of the project administrators.

I'm having my students try the 0 byte thing tonight, since I won't be there to mentor them. Have you already confirmed it works? My other idea is to waste one of the solenoid connections in order to get an instance variable to call the non-static getAll(), which should allow it to display the state of the solenoids.
Reply With Quote
  #13   Spotlight this post!  
Unread 27-01-2011, 10:06
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Driverstation / Dashboard in JAVA

Quote:
Originally Posted by frasnow View Post
Wow! I really appreciate your tenacity in trying to reproduce my problem. Hopefully FIRST will fix it soon. I was so astounded by them breaking the example code that I tried to send a message to Derek White at Oracle. He's listed on FIRST Forge as one of the project administrators.
It's in the wpilib tracker http://firstforge.wpi.edu/sf/go/artf1322
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi