|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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
![]() |
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
||||
|
||||
|
Re: Driverstation / Dashboard in JAVA
Quote:
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. |
|
#5
|
|||
|
|||
|
Re: Driverstation / Dashboard in JAVA
Quote:
You could try replacing the solenoid line with: Code:
byte thisBytes = 0; lowDashData.addByte(thisBytes); |
|
#6
|
|||
|
|||
|
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.
|
|
#7
|
||||
|
||||
|
Re: Driverstation / Dashboard in JAVA
Quote:
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. |
|
#8
|
||||||
|
||||||
|
Re: Driverstation / Dashboard in JAVA
Quote:
|
|
#9
|
|||
|
|||
|
Re: Driverstation / Dashboard in JAVA
I completely eradicated Netbeans from my computer and reinstalled... twice. Found the problem. Whatever is going on, even though my machine was claiming it had 2011.4 installed it hadn't actually updated the libraries. Got it sussed now, and yes, that line is broken.
Haven't had a chance to test the 0 byte workaround, won't be near my lab for a couple hours yet. |
|
#10
|
||||
|
||||
|
Re: Driverstation / Dashboard in JAVA
Quote:
|
|
#11
|
|||
|
|||
|
Re: Driverstation / Dashboard in JAVA
The zero byte workaround is good. You don't get a reading for the Solenoids on the dashboard, but you don't get error messages either.
|
|
#12
|
|||
|
|||
|
Re: Driverstation / Dashboard in JAVA
With version 2011.4 I observed that the posted dashboard code does not properly map the digital i/o pins on the sidecar to the leds on the dashboard gpio state and gpio output enable. First two leds are always off and led 3 maps to digital i/o 14. i/o 1 and 2 do not change any led on the dashboard.
The following code works properly: Code:
int dioData = 0;
for( int i = 1; i <= 14; i++)
{
if( DigitalModule.getInstance( module ).getDIO( i ) )
{
dioData |= ( 1 << i-1 );
}
}
lowDashData.addShort((short)dioData);
int dioDir = 0;
for( int i = 1; i <= 14; i++)
{
if( DigitalModule.getInstance( module ).getDIODirection( i ) )
{
dioDir |= ( 1 << i-1 );
}
}
lowDashData.addShort((short)dioDir);
|
|
#13
|
|||
|
|||
|
Re: Driverstation / Dashboard in JAVA
We are getting the problem that it is looking for v_20 and we already updated to v_25. We tried the above code and everything worked except the version error. Any ideas?
|
|
#14
|
||||||
|
||||||
|
Re: Driverstation / Dashboard in JAVA
It sounds like you didn't install the 2011 version of the java plugins.
|
|
#15
|
|||
|
|||
|
Re: Driverstation / Dashboard in JAVA
We rev'd back to 2011.3 and the dashboard is now working!
Ughh how much time we have wasted :-( |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|