Go to Post Sooo....in the famous words of Douglas Adams, Don't Panic. - Conor Ryan [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 11-25-2012, 04:44 PM
Skyehawk's Avatar
Skyehawk Skyehawk is offline
Nuts N' Bolts
AKA: Skye Leake
FRC #0876 (Thunder Robotics)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2011
Location: Northwood, ND
Posts: 198
Skyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to all
Re: Enhanced I/O through Cypress

I managed to test the program. I got this in the run box:
Code:
[cRIO] edu.wpi.first.wpilibj.DriverStationEnhancedIO$EnhancedIOException: Enhanced IO Missing
[cRIO]     at edu.wpi.first.wpilibj.DriverStationEnhancedIO.getDigitals(DriverStationEnhancedIO.java:629)
[cRIO]     at edu.wpi.first.wpilibj.DriverStationEnhancedIO.getDigital(DriverStationEnhancedIO.java:619)
[cRIO]     at edu.wpi.first.wpilibj.templates.RobotClass.teleopPeriodic(RobotClass.java:70)
[cRIO]     at edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:145)
[cRIO]     at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase.java:156)
[cRIO]     in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO]     at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(64)
[cRIO]     at com.sun.squawk.imp.MIDletMainWrapper.main(110)
[cRIO]     in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO]     at com.sun.squawk.Isolate.run(1506)
[cRIO]     at java.lang.Thread.run(231)
[cRIO]     in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO]     in static method #3 of com.sun.squawk.VM(bci=6)
[cRIO] Robot Drive... Output not updated often enough.
This is a single loop of the teleop portion of the code. It says near the top that it can not find the Enhanced I/O. Is this what was being refered to previously? I also made a few changes to my code:
Code:
         try {
             if (dseio.getDigital(1)) {
                 feed.setDirection(Relay.Direction.kForward);
             } else if (dseio.getDigital(3)) {
                 feed.setDirection(Relay.Direction.kReverse);
             }
         } catch (EnhancedIOException ex) {
             feed.set(Relay.Value.kOff);
             ex.printStackTrace();
         }
I changed the .getButton to .getDigital based on how things are labeled on the DS.
I reimaged the cRIO (to change IP) and my relay was not responding to my command from the joystick (it worked before I reimaged it). I added it to autonomous and the relay worked. (the joystick was responding in the dionostics tab so I have no Idea what caused it to quit working, I will restore the cRIO to the IP that it had previously) Once I get the relay going again on user command I will have a definate answer on whether or not this code worked, but in the meantime feel free to critique.
Reply With Quote
 


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 07:45 AM.

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