diff --git a/examples/src/main/java/io/github/oblarg/logexample/RobotContainer.java b/examples/src/main/java/io/github/oblarg/logexample/RobotContainer.java index 678109f..e9587cc 100644 --- a/examples/src/main/java/io/github/oblarg/logexample/RobotContainer.java +++ b/examples/src/main/java/io/github/oblarg/logexample/RobotContainer.java @@ -80,8 +80,8 @@ public RobotContainer() { // A split-stick arcade command, with forward/backward controlled by the left // hand, and turning controlled by the right. new RunCommand(() -> m_robotDrive - .arcadeDrive(m_driverController.getY(GenericHID.Hand.kLeft), - m_driverController.getX(GenericHID.Hand.kRight)), m_robotDrive)); + .arcadeDrive(m_driverController.getLeftX(), + m_driverController.getRightX()), m_robotDrive)); } @@ -111,7 +111,7 @@ private void configureButtonBindings() { m_shooter::atSetpoint)).whenReleased(new InstantCommand(m_shooter::stopFeeder, m_shooter)); // Drive at half speed when the bumper is held - new JoystickButton(m_driverController, Button.kBumperRight.value) + new JoystickButton(m_driverController, Button.kRightBumper.value) .whenPressed(() -> m_robotDrive.setMaxOutput(0.5)) .whenReleased(() -> m_robotDrive.setMaxOutput(1)); } diff --git a/examples/src/main/java/io/github/oblarg/logexample/subsystems/DriveSubsystem.java b/examples/src/main/java/io/github/oblarg/logexample/subsystems/DriveSubsystem.java index e39e231..63893f3 100644 --- a/examples/src/main/java/io/github/oblarg/logexample/subsystems/DriveSubsystem.java +++ b/examples/src/main/java/io/github/oblarg/logexample/subsystems/DriveSubsystem.java @@ -8,9 +8,9 @@ package io.github.oblarg.logexample.subsystems; import edu.wpi.first.wpilibj.Encoder; -import edu.wpi.first.wpilibj.PWMVictorSPX; -import edu.wpi.first.wpilibj.SpeedControllerGroup; import edu.wpi.first.wpilibj.drive.DifferentialDrive; +import edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup; +import edu.wpi.first.wpilibj.motorcontrol.PWMVictorSPX; import edu.wpi.first.wpilibj2.command.SubsystemBase; import io.github.oblarg.logexample.Constants.DriveConstants; @@ -21,14 +21,14 @@ public class DriveSubsystem extends SubsystemBase implements Loggable { // The motors on the left side of the drive. @Log.MotorController(name = "Left Motors") - private final SpeedControllerGroup m_leftMotors = - new SpeedControllerGroup(new PWMVictorSPX(DriveConstants.kLeftMotor1Port), + private final MotorControllerGroup m_leftMotors = + new MotorControllerGroup(new PWMVictorSPX(DriveConstants.kLeftMotor1Port), new PWMVictorSPX(DriveConstants.kLeftMotor2Port)); @Log.MotorController(name = "Right Motors") // The motors on the right side of the drive. - private final SpeedControllerGroup m_rightMotors = - new SpeedControllerGroup(new PWMVictorSPX(DriveConstants.kRightMotor1Port), + private final MotorControllerGroup m_rightMotors = + new MotorControllerGroup(new PWMVictorSPX(DriveConstants.kRightMotor1Port), new PWMVictorSPX(DriveConstants.kRightMotor2Port)); @Log.DifferentialDrive(name = "Drive") diff --git a/examples/src/main/java/io/github/oblarg/logexample/subsystems/ShooterSubsystem.java b/examples/src/main/java/io/github/oblarg/logexample/subsystems/ShooterSubsystem.java index 2d76bbc..89ba827 100644 --- a/examples/src/main/java/io/github/oblarg/logexample/subsystems/ShooterSubsystem.java +++ b/examples/src/main/java/io/github/oblarg/logexample/subsystems/ShooterSubsystem.java @@ -7,10 +7,10 @@ package io.github.oblarg.logexample.subsystems; +import edu.wpi.first.math.controller.PIDController; +import edu.wpi.first.math.controller.SimpleMotorFeedforward; import edu.wpi.first.wpilibj.Encoder; -import edu.wpi.first.wpilibj.PWMVictorSPX; -import edu.wpi.first.wpilibj.controller.PIDController; -import edu.wpi.first.wpilibj.controller.SimpleMotorFeedforward; +import edu.wpi.first.wpilibj.motorcontrol.PWMVictorSPX; import edu.wpi.first.wpilibj2.command.PIDSubsystem; import io.github.oblarg.logexample.Constants.ShooterConstants; diff --git a/lib/src/main/java/io/github/oblarg/oblog/annotations/Log.java b/lib/src/main/java/io/github/oblarg/oblog/annotations/Log.java index f6cb07c..817674e 100644 --- a/lib/src/main/java/io/github/oblarg/oblog/annotations/Log.java +++ b/lib/src/main/java/io/github/oblarg/oblog/annotations/Log.java @@ -158,6 +158,7 @@ * * * + * * * @@ -245,6 +246,7 @@ * *
NameTypeDefault ValueNotes
MinNumber0The minimum value of the dial
MaxNumber100The maximum value of the dial
* + * * * @@ -321,6 +323,7 @@ * *
NameTypeDefault ValueNotes
Visible timeNumber30How long, in seconds, should past data be visible for
* + * * *
NameTypeDefault ValueNotes
Color when trueColor"green"Can be specified as a string ({@code "#00FF00"}) or a rgba integer ({@code 0x00FF0000}) @@ -404,6 +407,7 @@ * * * + * * * @@ -485,11 +489,11 @@ } /** - * Displays a {@link edu.wpi.first.wpilibj.PowerDistributionPanel PowerDistributionPanel}.
+ * Displays a {@link edu.wpi.first.wpilibj.PowerDistribution PowerDistributionPanel}.
* Supported types: * *
    - *
  • {@link edu.wpi.first.wpilibj.PowerDistributionPanel} + *
  • {@link edu.wpi.first.wpilibj.PowerDistribution} *
* *
@@ -628,23 +632,23 @@ } /** - * Displays a {@link edu.wpi.first.wpilibj.SpeedController SpeedController}. The speed controller + * Displays a {@link edu.wpi.first.wpilibj.motorcontrol.MotorController MotorController}. The speed controller * will be controllable from the dashboard when test mode is enabled, but will otherwise be * view-only.
* Supported types: * *
    - *
  • {@link edu.wpi.first.wpilibj.PWMSpeedController} - *
  • {@link edu.wpi.first.wpilibj.DMC60} - *
  • {@link edu.wpi.first.wpilibj.Jaguar} - *
  • {@link edu.wpi.first.wpilibj.PWMTalonSRX} - *
  • {@link edu.wpi.first.wpilibj.PWMVictorSPX} - *
  • {@link edu.wpi.first.wpilibj.SD540} - *
  • {@link edu.wpi.first.wpilibj.Spark} - *
  • {@link edu.wpi.first.wpilibj.Talon} - *
  • {@link edu.wpi.first.wpilibj.Victor} - *
  • {@link edu.wpi.first.wpilibj.VictorSP} - *
  • {@link edu.wpi.first.wpilibj.SpeedControllerGroup} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.PWMMotorController} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.DMC60} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.Jaguar} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.PWMTalonSRX} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.PWMVictorSPX} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.SD540} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.Spark} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.Talon} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.Victor} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.VictorSP} + *
  • {@link edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup} *
* *
@@ -652,12 +656,13 @@ * *
NameTypeDefault ValueNotes
MinNumber0The minimum value of the bar
MaxNumber5The maximum value of the bar
* + * * * *
NameTypeDefault ValueNotes
OrientationString"HORIZONTAL"One of {@code ["HORIZONTAL", "VERTICAL"]}
*/ - @Repeatable(SpeedControllers.class) + @Repeatable(MotorControllers.class) @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) @interface MotorController { @@ -711,7 +716,7 @@ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) - @interface SpeedControllers { + @interface MotorControllers { MotorController[] value(); } @@ -729,6 +734,7 @@ * * * + * * * @@ -827,6 +833,7 @@ * *
NameTypeDefault ValueNotes
MinNumber-1The minimum acceleration value to display
* + * * * @@ -920,6 +927,7 @@ edu.wpi.first.wpilibj.interfaces.Accelerometer.Range range() default * *
NameTypeDefault ValueNotes
Range{@link edu.wpi.first.wpilibj.interfaces.Accelerometer.Range}k16GThe accelerometer range
Show valueBooleantrue
* + * * * @@ -1006,6 +1014,7 @@ edu.wpi.first.wpilibj.interfaces.Accelerometer.Range range() default * *
NameTypeDefault ValueNotes
Major tick spacingNumber45Degrees
Starting angleNumber180
* + * * @@ -1092,6 +1101,7 @@ edu.wpi.first.wpilibj.interfaces.Accelerometer.Range range() default * *
NameTypeDefault ValueNotes
Number of wheelsNumber4Must be a positive even integer *
* + * * *
NameTypeDefault ValueNotes
Show velocity vectorsBooleantrue