so our robot has been fitted for talons and we had it working for jaguars and we switched them back to jaguars with jaguar code and isn’t working like it should. anything visible,
package edu.wpi.first.wpilibj.templates;
//Imports wpilib for certain sections of code that are related
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.templates.commands.CommandBase;
import edu.wpi.first.wpilibj.templates.commands.ExampleCommand;
import edu.wpi.first.wpilibj.templates.commands.ShooterDoNothing;
import edu.wpi.first.wpilibj.templates.commands.ShooterOneThird;
import edu.wpi.first.wpilibj.templates.commands.ShooterTwoThirds;
import edu.wpi.first.wpilibj.templates.commands.ShooterWhole;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Jaguar;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the IterativeRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class RobotTemplate extends IterativeRobot {
//names all the wpi objects
Joystick leftStick = new Joystick(1);
Joystick rightStick = new Joystick(2);
Joystick thirdStick = new Joystick(3);
Jaguar leftdrive = new Jaguar(1);
Jaguar rightdrive = new Jaguar(2);
Button shooter1 = new JoystickButton(thirdStick,3);
Button shooter2 = new JoystickButton(thirdStick,4);
Button shooter3 = new JoystickButton(thirdStick,5);
Button shooterStop = new JoystickButton(thirdStick,2);
Jaguar shooter = new Jaguar(3);
RobotDrive drive = new RobotDrive(1, 2);
Command autonomousCommand;
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
// instantiate the command used for the autonomous period
// Initialize all subsystems
CommandBase.init();
}
public void autonomousInit() {
// schedule the autonomous command (example)
autonomousCommand.start();
drive.setSafetyEnabled(true);
Timer.delay(2.0);
drive.drive(-.5,0);
Timer.delay(2.0);
drive.drive(+.5,0);
Timer.delay(2.0);
drive.drive(0,0);
Timer.delay(.5);
}
/**
* This function is called periodically during autonomous
*/
public void autonomousPeriodic() {
Scheduler.getInstance().run();
}
public void teleopInit() {
// This makes sure that the autonomous stops running when
// teleop starts running. If you want the autonomous to
// continue until interrupted by another command, remove
// this line or comment it out.
autonomousCommand.cancel();
drive = new RobotDrive(leftdrive,rightdrive);
//Button commands for when the button is pressed
shooter1.whenPressed(new ShooterOneThird());
shooter2.whenPressed(new ShooterTwoThirds());
shooter3.whenPressed(new ShooterWhole());
shooterStop.whenPressed(new ShooterDoNothing());
while(isOperatorControl() && isEnabled()){
drive.tankDrive(leftStick, rightStick); // drive with the joysticks
Timer.delay(0.01);
}
}
/**
* This function is called periodically during operator control
*/
}
also for some reason at this point into building the code on the robot it stops here and wont continue but still says its in progress.
ant -f C:\\Users\\Sebastian\\Documents\\NetBeansProjects\\Project2012 deploy run
clean:
Deleting directory C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build
Created dir: C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build
Created dir: C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\classes
[crio-compile] ./src, C:/Users/Sebastian/sunspotfrcsdk\lib\wpilibj.jar;C:/Users/Sebastian/sunspotfrcsdk\lib
etworktables-crio.jar, C:/Users/Sebastian/sunspotfrcsdk\lib\squawk.jar -> ./build/classes
Compiling 12 source files to C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\classes
compile:
preverify:
Created dir: C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\preverify
Created dir: C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\preverify.raw.util
[crio-preverify] ./build/classes, , C:/Users/Sebastian/sunspotfrcsdk\lib\wpilibj.jar;C:/Users/Sebastian/sunspotfrcsdk\lib
etworktables-crio.jar, C:/Users/Sebastian/sunspotfrcsdk\lib\squawk.jar -> ./build/preverify
Expanding: C:\Users\Sebastian\sunspotfrcsdk\lib\wpilibj.jar into C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\preverify
Expanding: C:\Users\Sebastian\sunspotfrcsdk\lib
etworktables-crio.jar into C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\preverify
jar:
[crio-jar] ./build/preverify, ./resources -> ./build/app.jar
Building jar: C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\app.jar
suite:
Created dir: C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\suite
[crio-suite] ./build/app.jar -> ./build/suite/image
CompilerOracle: exclude com/sun/squawk/Method.getParameterTypes
CompilerOracle: exclude com/sun/squawk/SymbolParser.getSignatureTypeAt
CompilerOracle: exclude com/sun/squawk/SymbolParser.stripMethods
[translating suite image [closed: false, parent: squawk] ...]
### Excluding compile: com.sun.squawk.Method::getParameterTypes
### Excluding compile: com.sun.squawk.SymbolParser::getSignatureTypeAt
[Including resource: META-INF/MANIFEST.MF]
Romizer processed 388 classes and generated 4 files.
Expanding: C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\app.jar into C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\suite
Moving 1 file to C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\suite
Moving 1 file to C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\suite
Moving 1 file to C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\build\suite
Deleting: C:\Users\Sebastian\Documents\NetBeansProjects\Project2012\image.suite.api
deploy:
[crio-configure] Configuration files not included in this version of the sdk
[crio-configure] Checking that crio is configured for Java
Host OS: Windows NT (unknown) 6.2, 6.2
Host JVM: Java HotSpot(TM) 64-Bit Server VM 20.10-b01
Target IP: 10.40.85.2
Network interfaces on host:
Ralink RT5390 802.11b/g/n WiFi Adapter: address: 10.40.85.8 netmask: 255.255.255.255 or hidden by IPv6 address (due to Java on Windows Bug:6707289)
Connecting FTP @10.40.85.2
[crio-deploy] ./build/suite/image.suite -> 10.40.85.2
Sending local file image.suite
run:
Waiting for cRIO to reboot (1s)
Waiting for cRIO to reboot (2s)
Waiting for cRIO to reboot (3s)
Waiting for cRIO to reboot (4s)
Waiting for cRIO to reboot (5s)
Waiting for cRIO to reboot (6s)
Waiting for cRIO to reboot (7s)
[cRIO]
[cRIO] -> * Loading debug.o: debug
[cRIO] Debugging is up, target server mounted at /tsfs
[cRIO]
[cRIO]
[cRIO] VxWorks
[cRIO]
[cRIO] Copyright 1984-2006 Wind River Systems, Inc.
[cRIO]
[cRIO] CPU: cRIO-FRC II
[cRIO] Runtime Name: VxWorks
[cRIO] Runtime Version: 6.3
[cRIO] BSP version: 1.0/0
[cRIO] Created: Jun 14 2012, 08:43:39
[cRIO] ED&R Policy Mode: Deployed
[cRIO] WDB Comm Type: WDB_COMM_END
[cRIO] WDB: Ready.
[cRIO]
[cRIO] * Loading nisysrpc.out: nisysrpc
[cRIO] * Loading NiRioRpc.out: NiRioRpc
[cRIO] * Loading nivissvc.out: nivissvc
[cRIO] * Loading nivision.out: nivision
[cRIO] NI-RIO Server 12.0.0b10 started successfully.
[cRIO] task 0xe1d640 (NiRioRpc) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading visa32.out: visa32
[cRIO] * Loading niserial.out: niserial
[cRIO] * Loading NiFpgaLv.out: NiFpgaLv
[cRIO] * Loading FRC_FPGA.out: FRC_FPGA
[cRIO] * Loading FRC_NetworkCommunication.out: FRC_NetworkCommunication
[cRIO] FRC_NetworkCommunication version: p4-1.4.0a10
[cRIO] FPGA Hardware GUID: 0x1394F6DC1FEB42EC6910E5767ED1D22C
[cRIO] FPGA Software GUID: 0x1394F6DC1FEB42EC6910E5767ED1D22C
[cRIO] FPGA Hardware Version: 2012
[cRIO] FPGA Software Version: 2012
[cRIO] FPGA Hardware Revision: 1.6.4
[cRIO] FPGA Software Revision: 1.6.4
[cRIO] * Loading FRC_JavaVM.out: FRC_JavaVM
[cRIO]
[cRIO] Welcome to LabVIEW Real-Time 12.0rc7
[cRIO] task 0xd22648 (sysapi-rpc) deleted: errno=0 (0) status=0 (0)
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Nov 5 2011, 14:34:13
[cRIO] FPGA Hardware GUID: 0x1394f6dc1feb42ec6910e5767ed1d22c
[cRIO] FPGA Software GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9
[cRIO] Uncaught exception in Thread.run():
[cRIO] on thread edu.wpi.first.wpilibj.templates.RobotTemplate - main
[cRIO] edu.wpi.first.wpilibj.util.AllocationException: PWM channel 1 on module 1 is already allocated
[cRIO] at edu.wpi.first.wpilibj.PWM.initPWM(PWM.java:116)
[cRIO] at edu.wpi.first.wpilibj.PWM.<init>(PWM.java:146)
[cRIO] at edu.wpi.first.wpilibj.SafePWM.<init>(SafePWM.java:33)
[cRIO] at edu.wpi.first.wpilibj.Jaguar.<init>(Jaguar.java:44)
[cRIO] at edu.wpi.first.wpilibj.RobotDrive.<init>(RobotDrive.java:91)
[cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.<init>(RobotTemplate.java:58)
[cRIO] in virtual method #11 of com.sun.squawk.Klass(bci=53)
[cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(99)
[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] edu.wpi.first.wpilibj.networktables2.server.ServerConnectionAdapter@8 entered connection state: GOT_CONNECTION_FROM_CLIENT
[cRIO] edu.wpi.first.wpilibj.networktables2.server.ServerConnectionAdapter@8 entered connection state: CONNECTED_TO_CLIENT
BUILD STOPPED (total time: 2 minutes 36 seconds)