mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
SCRIPT Run java package replacements
This commit is contained in:
committed by
Peter Johnson
parent
12823a003d
commit
f0a3c64121
@@ -2,10 +2,10 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.SimDouble;
|
||||
import edu.wpi.first.wpilibj.ADXL345_I2C;
|
||||
import org.wpilib.hardware.hal.SimDouble;
|
||||
import org.wpilib.hardware.accelerometer.ADXL345_I2C;
|
||||
import java.util.Objects;
|
||||
|
||||
/** Class to control a simulated ADXL345. */
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.AddressableLEDDataJNI;
|
||||
import edu.wpi.first.hal.simulation.ConstBufferCallback;
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.wpilibj.AddressableLED;
|
||||
import org.wpilib.hardware.hal.simulation.AddressableLEDDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.ConstBufferCallback;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.led.AddressableLED;
|
||||
|
||||
/** Class to control a simulated addressable LED. */
|
||||
public class AddressableLEDSim {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.SimDouble;
|
||||
import edu.wpi.first.wpilibj.AnalogEncoder;
|
||||
import org.wpilib.hardware.hal.SimDouble;
|
||||
import org.wpilib.hardware.rotation.AnalogEncoder;
|
||||
|
||||
/** Class to control a simulated analog encoder. */
|
||||
public class AnalogEncoderSim {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.AnalogInDataJNI;
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.wpilibj.AnalogInput;
|
||||
import org.wpilib.hardware.hal.simulation.AnalogInDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.discrete.AnalogInput;
|
||||
|
||||
/** Class to control a simulated analog input. */
|
||||
public class AnalogInputSim {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
/** A utility class to simulate the robot battery. */
|
||||
public final class BatterySim {
|
||||
@@ -13,7 +13,7 @@ public final class BatterySim {
|
||||
/**
|
||||
* Calculate the loaded battery voltage. Use this with {@link RoboRioSim#setVInVoltage(double)} to
|
||||
* set the simulated battery voltage, which can then be retrieved with the {@link
|
||||
* edu.wpi.first.wpilibj.RobotController#getBatteryVoltage()} method.
|
||||
* org.wpilib.system.RobotController#getBatteryVoltage()} method.
|
||||
*
|
||||
* @param nominalVoltage The nominal battery voltage. Usually 12v.
|
||||
* @param resistanceOhms The forward resistance of the battery. Most batteries are at or below 20
|
||||
@@ -33,7 +33,7 @@ public final class BatterySim {
|
||||
/**
|
||||
* Calculate the loaded battery voltage. Use this with {@link RoboRioSim#setVInVoltage(double)} to
|
||||
* set the simulated battery voltage, which can then be retrieved with the {@link
|
||||
* edu.wpi.first.wpilibj.RobotController#getBatteryVoltage()} method. This function assumes a
|
||||
* org.wpilib.system.RobotController#getBatteryVoltage()} method. This function assumes a
|
||||
* nominal voltage of 12v and a resistance of 20 milliohms (0.020 ohms)
|
||||
*
|
||||
* @param currents The currents drawn from the battery.
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.CTREPCMDataJNI;
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.wpilibj.PneumaticsControlModule;
|
||||
import edu.wpi.first.wpilibj.SensorUtil;
|
||||
import org.wpilib.hardware.hal.simulation.CTREPCMDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticsControlModule;
|
||||
import org.wpilib.system.SensorUtil;
|
||||
|
||||
/** Class to control a simulated Pneumatic Control Module (PCM). */
|
||||
public class CTREPCMSim extends PneumaticsBaseSim {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
/** Manages simulation callbacks; each object is associated with a callback. */
|
||||
public class CallbackStore implements AutoCloseable {
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.math.VecBuilder;
|
||||
import edu.wpi.first.math.numbers.N1;
|
||||
import edu.wpi.first.math.numbers.N2;
|
||||
import edu.wpi.first.math.system.LinearSystem;
|
||||
import edu.wpi.first.math.system.plant.DCMotor;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.system.RobotController;
|
||||
|
||||
/** Represents a simulated DC motor mechanism. */
|
||||
public class DCMotorSim extends LinearSystemSim<N2, N1, N2> {
|
||||
@@ -26,10 +26,10 @@ public class DCMotorSim extends LinearSystemSim<N2, N1, N2> {
|
||||
* Creates a simulated DC motor mechanism.
|
||||
*
|
||||
* @param plant The linear system representing the DC motor. This system can be created with
|
||||
* {@link edu.wpi.first.math.system.plant.LinearSystemId#createDCMotorSystem(DCMotor, double,
|
||||
* {@link org.wpilib.math.system.plant.LinearSystemId#createDCMotorSystem(DCMotor, double,
|
||||
* double)} or {@link
|
||||
* edu.wpi.first.math.system.plant.LinearSystemId#createDCMotorSystem(double, double)}. If
|
||||
* {@link edu.wpi.first.math.system.plant.LinearSystemId#createDCMotorSystem(double, double)}
|
||||
* org.wpilib.math.system.plant.LinearSystemId#createDCMotorSystem(double, double)}. If
|
||||
* {@link org.wpilib.math.system.plant.LinearSystemId#createDCMotorSystem(double, double)}
|
||||
* is used, the distance unit must be radians.
|
||||
* @param gearbox The type of and number of motors in the DC motor gearbox.
|
||||
* @param measurementStdDevs The standard deviations of the measurements. Can be omitted if no
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.DIODataJNI;
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.wpilibj.DigitalInput;
|
||||
import edu.wpi.first.wpilibj.DigitalOutput;
|
||||
import org.wpilib.hardware.hal.simulation.DIODataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.discrete.DigitalInput;
|
||||
import org.wpilib.hardware.discrete.DigitalOutput;
|
||||
|
||||
/** Class to control a simulated digital input or output. */
|
||||
public class DIOSim {
|
||||
|
||||
@@ -2,29 +2,29 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.math.Matrix;
|
||||
import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.StateSpaceUtil;
|
||||
import edu.wpi.first.math.VecBuilder;
|
||||
import edu.wpi.first.math.geometry.Pose2d;
|
||||
import edu.wpi.first.math.geometry.Rotation2d;
|
||||
import edu.wpi.first.math.numbers.N1;
|
||||
import edu.wpi.first.math.numbers.N2;
|
||||
import edu.wpi.first.math.numbers.N7;
|
||||
import edu.wpi.first.math.system.LinearSystem;
|
||||
import edu.wpi.first.math.system.NumericalIntegration;
|
||||
import edu.wpi.first.math.system.plant.DCMotor;
|
||||
import edu.wpi.first.math.system.plant.LinearSystemId;
|
||||
import edu.wpi.first.math.util.Units;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.StateSpaceUtil;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.numbers.N7;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
import org.wpilib.math.system.NumericalIntegration;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.wpilib.system.RobotController;
|
||||
|
||||
/**
|
||||
* This class simulates the state of the drivetrain. In simulationPeriodic, users should first set
|
||||
* inputs from motors with {@link #setInputs(double, double)}, call {@link #update(double)} to
|
||||
* update the simulation, and set estimated encoder and gyro positions, as well as estimated
|
||||
* odometry pose. Teams can use {@link edu.wpi.first.wpilibj.smartdashboard.Field2d} to visualize
|
||||
* odometry pose. Teams can use {@link org.wpilib.smartdashboard.Field2d} to visualize
|
||||
* their robot on the Sim GUI's field.
|
||||
*
|
||||
* <p>Our state-space system is:
|
||||
@@ -90,9 +90,9 @@ public class DifferentialDrivetrainSim {
|
||||
*
|
||||
* @param plant The {@link LinearSystem} representing the robot's drivetrain. This system can be
|
||||
* created with {@link
|
||||
* edu.wpi.first.math.system.plant.LinearSystemId#createDrivetrainVelocitySystem(DCMotor,
|
||||
* org.wpilib.math.system.plant.LinearSystemId#createDrivetrainVelocitySystem(DCMotor,
|
||||
* double, double, double, double, double)} or {@link
|
||||
* edu.wpi.first.math.system.plant.LinearSystemId#identifyDrivetrainSystem(double, double,
|
||||
* org.wpilib.math.system.plant.LinearSystemId#identifyDrivetrainSystem(double, double,
|
||||
* double, double)}.
|
||||
* @param driveMotor A {@link DCMotor} representing the drivetrain.
|
||||
* @param gearing The gearingRatio ratio of the robot, as output over input. This must be the same
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.DigitalPWMDataJNI;
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.wpilibj.DigitalOutput;
|
||||
import org.wpilib.hardware.hal.simulation.DigitalPWMDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.discrete.DigitalOutput;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.wpilibj.DoubleSolenoid;
|
||||
import edu.wpi.first.wpilibj.PneumaticsBase;
|
||||
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
||||
import org.wpilib.hardware.pneumatic.DoubleSolenoid;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticsBase;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticsModuleType;
|
||||
|
||||
/** Class to control a simulated {@link edu.wpi.first.wpilibj.DoubleSolenoid}. */
|
||||
/** Class to control a simulated {@link org.wpilib.hardware.pneumatic.DoubleSolenoid}. */
|
||||
public class DoubleSolenoidSim {
|
||||
private final PneumaticsBaseSim m_module;
|
||||
private final int m_fwd;
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.AllianceStationID;
|
||||
import edu.wpi.first.hal.DriverStationJNI;
|
||||
import edu.wpi.first.hal.simulation.DriverStationDataJNI;
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.util.WPIUtilJNI;
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import org.wpilib.hardware.hal.AllianceStationID;
|
||||
import org.wpilib.hardware.hal.DriverStationJNI;
|
||||
import org.wpilib.hardware.hal.simulation.DriverStationDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.util.WPIUtilJNI;
|
||||
import org.wpilib.driverstation.DriverStation;
|
||||
|
||||
/** Class to control a simulated driver station. */
|
||||
public final class DriverStationSim {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.SimBoolean;
|
||||
import edu.wpi.first.hal.SimDouble;
|
||||
import edu.wpi.first.wpilibj.DutyCycleEncoder;
|
||||
import org.wpilib.hardware.hal.SimBoolean;
|
||||
import org.wpilib.hardware.hal.SimDouble;
|
||||
import org.wpilib.hardware.rotation.DutyCycleEncoder;
|
||||
|
||||
/** Class to control a simulated duty cycle encoder. */
|
||||
public class DutyCycleEncoderSim {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.DutyCycleDataJNI;
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.wpilibj.DutyCycle;
|
||||
import org.wpilib.hardware.hal.simulation.DutyCycleDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.rotation.DutyCycle;
|
||||
|
||||
/** Class to control a simulated duty cycle digital input. */
|
||||
public class DutyCycleSim {
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.math.Matrix;
|
||||
import edu.wpi.first.math.VecBuilder;
|
||||
import edu.wpi.first.math.numbers.N1;
|
||||
import edu.wpi.first.math.numbers.N2;
|
||||
import edu.wpi.first.math.system.LinearSystem;
|
||||
import edu.wpi.first.math.system.NumericalIntegration;
|
||||
import edu.wpi.first.math.system.plant.DCMotor;
|
||||
import edu.wpi.first.math.system.plant.LinearSystemId;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
import org.wpilib.math.system.NumericalIntegration;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.system.RobotController;
|
||||
|
||||
/** Represents a simulated elevator mechanism. */
|
||||
public class ElevatorSim extends LinearSystemSim<N2, N1, N2> {
|
||||
@@ -32,7 +32,7 @@ public class ElevatorSim extends LinearSystemSim<N2, N1, N2> {
|
||||
* Creates a simulated elevator mechanism.
|
||||
*
|
||||
* @param plant The linear system that represents the elevator. This system can be created with
|
||||
* {@link edu.wpi.first.math.system.plant.LinearSystemId#createElevatorSystem(DCMotor, double,
|
||||
* {@link org.wpilib.math.system.plant.LinearSystemId#createElevatorSystem(DCMotor, double,
|
||||
* double, double)}.
|
||||
* @param gearbox The type of and number of motors in the elevator gearbox.
|
||||
* @param minHeight The min allowable height of the elevator in meters.
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.EncoderDataJNI;
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import org.wpilib.hardware.hal.simulation.EncoderDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/** Class to control a simulated encoder. */
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.math.VecBuilder;
|
||||
import edu.wpi.first.math.numbers.N1;
|
||||
import edu.wpi.first.math.system.LinearSystem;
|
||||
import edu.wpi.first.math.system.plant.DCMotor;
|
||||
import edu.wpi.first.math.system.plant.LinearSystemId;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.system.RobotController;
|
||||
|
||||
/** Represents a simulated flywheel mechanism. */
|
||||
public class FlywheelSim extends LinearSystemSim<N1, N1, N1> {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.wpilibj.Gamepad;
|
||||
import org.wpilib.driverstation.Gamepad;
|
||||
|
||||
/** Class to control a simulated Gamepad controller. */
|
||||
public class GamepadSim extends GenericHIDSim {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.GenericHID;
|
||||
import org.wpilib.driverstation.DriverStation;
|
||||
import org.wpilib.driverstation.GenericHID;
|
||||
|
||||
/** Class to control a simulated generic joystick. */
|
||||
public class GenericHIDSim {
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.BufferCallback;
|
||||
import edu.wpi.first.hal.simulation.ConstBufferCallback;
|
||||
import edu.wpi.first.hal.simulation.I2CDataJNI;
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.hal.simulation.BufferCallback;
|
||||
import org.wpilib.hardware.hal.simulation.ConstBufferCallback;
|
||||
import org.wpilib.hardware.hal.simulation.I2CDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
|
||||
/** A class to control a simulated I2C device. */
|
||||
public class I2CSim {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import org.wpilib.driverstation.Joystick;
|
||||
|
||||
/** Class to control a simulated joystick. */
|
||||
public class JoystickSim extends GenericHIDSim {
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.math.Matrix;
|
||||
import edu.wpi.first.math.Num;
|
||||
import edu.wpi.first.math.StateSpaceUtil;
|
||||
import edu.wpi.first.math.numbers.N1;
|
||||
import edu.wpi.first.math.system.LinearSystem;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Num;
|
||||
import org.wpilib.math.util.StateSpaceUtil;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
import org.ejml.MatrixDimensionException;
|
||||
import org.ejml.simple.SimpleMatrix;
|
||||
|
||||
/**
|
||||
* This class helps simulate linear systems. To use this class, do the following in the {@link
|
||||
* edu.wpi.first.wpilibj.IterativeRobotBase#simulationPeriodic} method.
|
||||
* org.wpilib.opmode.IterativeRobotBase#simulationPeriodic} method.
|
||||
*
|
||||
* <p>Call {@link #setInput(double...)} with the inputs to the system (usually voltage).
|
||||
*
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.NotifierDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.NotifierDataJNI;
|
||||
|
||||
/** Class to control simulated notifiers. */
|
||||
public final class NotifierSim {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.hal.simulation.PowerDistributionDataJNI;
|
||||
import edu.wpi.first.wpilibj.PowerDistribution;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.hal.simulation.PowerDistributionDataJNI;
|
||||
import org.wpilib.hardware.power.PowerDistribution;
|
||||
|
||||
/** Class to control a simulated Power Distribution Panel (PDP). */
|
||||
public class PDPSim {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.SimDouble;
|
||||
import edu.wpi.first.wpilibj.motorcontrol.PWMMotorController;
|
||||
import org.wpilib.hardware.hal.SimDouble;
|
||||
import org.wpilib.hardware.motor.PWMMotorController;
|
||||
|
||||
/** Class to control a simulated PWM motor controller. */
|
||||
public class PWMMotorControllerSim {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.hal.simulation.PWMDataJNI;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.hal.simulation.PWMDataJNI;
|
||||
import org.wpilib.hardware.discrete.PWM;
|
||||
|
||||
/** Class to control a simulated PWM output. */
|
||||
public class PWMSim {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.wpilibj.PneumaticsBase;
|
||||
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticsBase;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticsModuleType;
|
||||
|
||||
/** Common base class for pneumatics module simulation classes. */
|
||||
public abstract class PneumaticsBaseSim {
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.hal.simulation.REVPHDataJNI;
|
||||
import edu.wpi.first.wpilibj.PneumaticHub;
|
||||
import edu.wpi.first.wpilibj.SensorUtil;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.hal.simulation.REVPHDataJNI;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticHub;
|
||||
import org.wpilib.system.SensorUtil;
|
||||
|
||||
/** Class to control a simulated PneumaticHub (PH). */
|
||||
public class REVPHSim extends PneumaticsBaseSim {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.hal.simulation.RoboRioDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.hal.simulation.RoboRioDataJNI;
|
||||
|
||||
/** A utility class to control a simulated RoboRIO. */
|
||||
public final class RoboRioSim {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||
import edu.wpi.first.networktables.StringPublisher;
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.networktables.StringPublisher;
|
||||
import org.wpilib.opmode.RobotBase;
|
||||
|
||||
/** Class that facilitates control of a SendableChooser's selected option in simulation. */
|
||||
public class SendableChooserSim implements AutoCloseable {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.SimDouble;
|
||||
import edu.wpi.first.wpilibj.SharpIR;
|
||||
import org.wpilib.hardware.hal.SimDouble;
|
||||
import org.wpilib.hardware.range.SharpIR;
|
||||
|
||||
/** Simulation class for Sharp IR sensors. */
|
||||
public class SharpIRSim {
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.SimBoolean;
|
||||
import edu.wpi.first.hal.SimDouble;
|
||||
import edu.wpi.first.hal.SimEnum;
|
||||
import edu.wpi.first.hal.SimInt;
|
||||
import edu.wpi.first.hal.SimLong;
|
||||
import edu.wpi.first.hal.SimValue;
|
||||
import edu.wpi.first.hal.simulation.SimDeviceCallback;
|
||||
import edu.wpi.first.hal.simulation.SimDeviceDataJNI;
|
||||
import edu.wpi.first.hal.simulation.SimValueCallback;
|
||||
import org.wpilib.hardware.hal.SimBoolean;
|
||||
import org.wpilib.hardware.hal.SimDouble;
|
||||
import org.wpilib.hardware.hal.SimEnum;
|
||||
import org.wpilib.hardware.hal.SimInt;
|
||||
import org.wpilib.hardware.hal.SimLong;
|
||||
import org.wpilib.hardware.hal.SimValue;
|
||||
import org.wpilib.hardware.hal.simulation.SimDeviceCallback;
|
||||
import org.wpilib.hardware.hal.simulation.SimDeviceDataJNI;
|
||||
import org.wpilib.hardware.hal.simulation.SimValueCallback;
|
||||
|
||||
/** Class to control the simulation side of a SimDevice. */
|
||||
public class SimDeviceSim {
|
||||
@@ -235,7 +235,7 @@ public class SimDeviceSim {
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a callback to be run every time a new {@link edu.wpi.first.hal.SimDevice} is created.
|
||||
* Register a callback to be run every time a new {@link org.wpilib.hardware.hal.SimDevice} is created.
|
||||
*
|
||||
* @param prefix the prefix to filter sim devices
|
||||
* @param callback the callback
|
||||
@@ -249,7 +249,7 @@ public class SimDeviceSim {
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a callback to be run every time a {@link edu.wpi.first.hal.SimDevice} is
|
||||
* Register a callback to be run every time a {@link org.wpilib.hardware.hal.SimDevice} is
|
||||
* freed/destroyed.
|
||||
*
|
||||
* @param prefix the prefix to filter sim devices
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.SimulatorJNI;
|
||||
import org.wpilib.hardware.hal.simulation.SimulatorJNI;
|
||||
|
||||
/** Simulation hooks. */
|
||||
public final class SimHooks {
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.math.Matrix;
|
||||
import edu.wpi.first.math.VecBuilder;
|
||||
import edu.wpi.first.math.numbers.N1;
|
||||
import edu.wpi.first.math.numbers.N2;
|
||||
import edu.wpi.first.math.system.LinearSystem;
|
||||
import edu.wpi.first.math.system.NumericalIntegration;
|
||||
import edu.wpi.first.math.system.plant.DCMotor;
|
||||
import edu.wpi.first.math.system.plant.LinearSystemId;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
import org.wpilib.math.system.NumericalIntegration;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.system.RobotController;
|
||||
|
||||
/** Represents a simulated single jointed arm mechanism. */
|
||||
public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N2> {
|
||||
@@ -38,7 +38,7 @@ public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N2> {
|
||||
* Creates a simulated arm mechanism.
|
||||
*
|
||||
* @param plant The linear system that represents the arm. This system can be created with {@link
|
||||
* edu.wpi.first.math.system.plant.LinearSystemId#createSingleJointedArmSystem(DCMotor,
|
||||
* org.wpilib.math.system.plant.LinearSystemId#createSingleJointedArmSystem(DCMotor,
|
||||
* double, double)}.
|
||||
* @param gearbox The type of and number of motors in the arm gearbox.
|
||||
* @param gearing The gearing of the arm (numbers greater than 1 represent reductions).
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
package org.wpilib.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.NotifyCallback;
|
||||
import edu.wpi.first.wpilibj.PneumaticsBase;
|
||||
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
||||
import org.wpilib.hardware.hal.simulation.NotifyCallback;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticsBase;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticsModuleType;
|
||||
|
||||
/** Class to control a simulated {@link edu.wpi.first.wpilibj.Solenoid}. */
|
||||
/** Class to control a simulated {@link org.wpilib.hardware.pneumatic.Solenoid}. */
|
||||
public class SolenoidSim {
|
||||
private final PneumaticsBaseSim m_module;
|
||||
private final int m_channel;
|
||||
|
||||
Reference in New Issue
Block a user