Go to Post If they're going to blame you for it anyway, you might as well have fun. - Rick TYler [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
  #1   Spotlight this post!  
Unread 01-10-2015, 13:57
xcountry413 xcountry413 is offline
Registered User
FRC #2022
 
Join Date: Oct 2015
Location: Aurora
Posts: 2
xcountry413 is an unknown quantity at this point
Code Not Uploading to Bot

I'm a new programmer for my team and am having trouble uploading code to the bot. The output of the program is:
Code:
run:
java.lang.ExceptionInInitializerError
Caused by: edu.wpi.first.wpilibj.util.BaseSystemNotInitializedException: The Interface for the HLUsageReporting was never set.
	at edu.wpi.first.wpilibj.HLUsageReporting.reportScheduler(HLUsageReporting.java:21)
	at edu.wpi.first.wpilibj.command.Scheduler.<init>(Scheduler.java:92)
	at edu.wpi.first.wpilibj.command.Scheduler.getInstance(Scheduler.java:48)
	at edu.wpi.first.wpilibj.command.Subsystem.<init>(Subsystem.java:60)
	at org.usfirst.frc.team2022.robot.subsystems.TankDriveSubsystem.<init>(TankDriveSubsystem.java:21)
	at org.usfirst.frc.team2022.robot.Robot.<clinit>(Robot.java:25)
Exception in thread "main" Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
I'm not sure what the HLUsageReporting is and what the exception is saying.

Here's the code for the main class:
Code:
package org.usfirst.frc.team2022.robot;

import org.usfirst.frc.team2022.robot.commands.CompressorCommand;
import org.usfirst.frc.team2022.robot.commands.ForkliftCommand;
import org.usfirst.frc.team2022.robot.commands.IntakeCommand;
import org.usfirst.frc.team2022.robot.commands.TankDriveCommand;
//import org.usfirst.frc.team2022.robot.commands.autonomous.Autonomous;
import org.usfirst.frc.team2022.robot.subsystems.ForkliftSubsystem;
import org.usfirst.frc.team2022.robot.subsystems.GyroSubsystem;
import org.usfirst.frc.team2022.robot.subsystems.IntakeSubsystem;
import org.usfirst.frc.team2022.robot.subsystems.TankDriveSubsystem;

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Scheduler;

/**
 * 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 Robot extends IterativeRobot {

	public static final TankDriveSubsystem tankSubsystem = new TankDriveSubsystem();
	public static final ForkliftSubsystem forkliftSubsystem = new ForkliftSubsystem();
	public static final GyroSubsystem gyroSubsystem = new GyroSubsystem();
	public static OI oi;
	public static final IntakeSubsystem intakeSubsystem = new IntakeSubsystem();

//	CommandGroup autonomousCommand;
	TankDriveCommand tankCommand;
	ForkliftCommand forkliftCommand;
	IntakeCommand intakeCommand;
	CompressorCommand compressorCommand;

	/**
	 * This function is run when the robot is first started up and should be
	 * used for any initialization code.
	 */
	@Override
	public void robotInit() {
		oi = new OI();
		// instantiate the command used for the autonomous period
//		autonomousCommand = new Autonomous();
		// instantiate the real commands
		tankCommand = new TankDriveCommand();
		forkliftCommand = new ForkliftCommand();
		intakeCommand = new IntakeCommand();
		compressorCommand = new CompressorCommand();
	}

	@Override
	public void disabledPeriodic() {
		Scheduler.getInstance().run();
	}

	@Override
	public void autonomousInit() {
		// schedule the autonomous command
//		if (autonomousCommand != null)
//			autonomousCommand.start();
	}

	/**
	 * This function is called periodically during autonomous
	 */
	@Override
	public void autonomousPeriodic() {
		Scheduler.getInstance().run();
	}

	@Override
	public void teleopInit() {
//		if (autonomousCommand != null)
//			autonomousCommand.cancel();
		tankCommand.start();
		forkliftCommand.start();
		intakeCommand.start();
		compressorCommand.start();
	}

	/**
	 * This function is called when the disabled button is hit. You can use it
	 * to reset subsystems before shutting down.
	 */
	@Override
	public void disabledInit() {
		//
	}

	/**
	 * This function is called periodically during operator control
	 */
	@Override
	public void teleopPeriodic() {
		Scheduler.getInstance().run();
	}

	/**
	 * This function is called periodically during test mode
	 */
	@Override
	public void testPeriodic() {
	}
}
The error in the subsystem is at the constructor of the class. Any help is appreciated
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 10:21.

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