mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Replace deprecated API usage in C++ examples
Since there is a new version of GearsBot using the new command-based API, the old GearsBot is just removed. PR #1842 is being included to verify this PR is correct.
This commit is contained in:
committed by
Peter Johnson
parent
d6b9c7e148
commit
c9f9feff1f
@@ -1,30 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/buttons/JoystickButton.h>
|
||||
|
||||
class OI {
|
||||
public:
|
||||
OI();
|
||||
frc::Joystick& GetJoystick();
|
||||
|
||||
private:
|
||||
frc::Joystick m_joy{0};
|
||||
|
||||
// Create some buttons
|
||||
frc::JoystickButton m_dUp{&m_joy, 5};
|
||||
frc::JoystickButton m_dRight{&m_joy, 6};
|
||||
frc::JoystickButton m_dDown{&m_joy, 7};
|
||||
frc::JoystickButton m_dLeft{&m_joy, 8};
|
||||
frc::JoystickButton m_l2{&m_joy, 9};
|
||||
frc::JoystickButton m_r2{&m_joy, 10};
|
||||
frc::JoystickButton m_l1{&m_joy, 11};
|
||||
frc::JoystickButton m_r1{&m_joy, 12};
|
||||
};
|
||||
@@ -1,41 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/commands/Command.h>
|
||||
#include <frc/commands/Scheduler.h>
|
||||
#include <frc/livewindow/LiveWindow.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
|
||||
#include "OI.h"
|
||||
#include "commands/Autonomous.h"
|
||||
#include "subsystems/Claw.h"
|
||||
#include "subsystems/DriveTrain.h"
|
||||
#include "subsystems/Elevator.h"
|
||||
#include "subsystems/Wrist.h"
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
static DriveTrain drivetrain;
|
||||
static Elevator elevator;
|
||||
static Wrist wrist;
|
||||
static Claw claw;
|
||||
static OI oi;
|
||||
|
||||
private:
|
||||
Autonomous m_autonomousCommand;
|
||||
frc::LiveWindow& m_lw = *frc::LiveWindow::GetInstance();
|
||||
|
||||
void RobotInit() override;
|
||||
void AutonomousInit() override;
|
||||
void AutonomousPeriodic() override;
|
||||
void TeleopInit() override;
|
||||
void TeleopPeriodic() override;
|
||||
void TestPeriodic() override;
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/commands/CommandGroup.h>
|
||||
|
||||
/**
|
||||
* The main autonomous command to pickup and deliver the soda to the box.
|
||||
*/
|
||||
class Autonomous : public frc::CommandGroup {
|
||||
public:
|
||||
Autonomous();
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/commands/Command.h>
|
||||
|
||||
/**
|
||||
* Opens the claw for one second. Real robots should use sensors, stalling
|
||||
* motors is BAD!
|
||||
*/
|
||||
class CloseClaw : public frc::Command {
|
||||
public:
|
||||
CloseClaw();
|
||||
void Initialize() override;
|
||||
bool IsFinished() override;
|
||||
void End() override;
|
||||
};
|
||||
@@ -1,44 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/PIDController.h>
|
||||
#include <frc/PIDOutput.h>
|
||||
#include <frc/PIDSource.h>
|
||||
#include <frc/commands/Command.h>
|
||||
|
||||
/**
|
||||
* Drive the given distance straight (negative values go backwards).
|
||||
* Uses a local PID controller to run a simple PID loop that is only
|
||||
* enabled while this command is running. The input is the averaged
|
||||
* values of the left and right encoders.
|
||||
*/
|
||||
class DriveStraight : public frc::Command {
|
||||
public:
|
||||
explicit DriveStraight(double distance);
|
||||
void Initialize() override;
|
||||
bool IsFinished() override;
|
||||
void End() override;
|
||||
|
||||
class DriveStraightPIDSource : public frc::PIDSource {
|
||||
public:
|
||||
virtual ~DriveStraightPIDSource() = default;
|
||||
double PIDGet() override;
|
||||
};
|
||||
|
||||
class DriveStraightPIDOutput : public frc::PIDOutput {
|
||||
public:
|
||||
virtual ~DriveStraightPIDOutput() = default;
|
||||
void PIDWrite(double d) override;
|
||||
};
|
||||
|
||||
private:
|
||||
DriveStraightPIDSource m_source;
|
||||
DriveStraightPIDOutput m_output;
|
||||
frc::PIDController m_pid{4, 0, 0, &m_source, &m_output};
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/commands/Command.h>
|
||||
|
||||
/**
|
||||
* Opens the claw for one second. Real robots should use sensors, stalling
|
||||
* motors is BAD!
|
||||
*/
|
||||
class OpenClaw : public frc::Command {
|
||||
public:
|
||||
OpenClaw();
|
||||
void Initialize() override;
|
||||
bool IsFinished() override;
|
||||
void End() override;
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/commands/CommandGroup.h>
|
||||
|
||||
/**
|
||||
* Pickup a soda can (if one is between the open claws) and
|
||||
* get it in a safe state to drive around.
|
||||
*/
|
||||
class Pickup : public frc::CommandGroup {
|
||||
public:
|
||||
Pickup();
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/commands/CommandGroup.h>
|
||||
|
||||
/**
|
||||
* Place a held soda can onto the platform.
|
||||
*/
|
||||
class Place : public frc::CommandGroup {
|
||||
public:
|
||||
Place();
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/commands/CommandGroup.h>
|
||||
|
||||
/**
|
||||
* Make sure the robot is in a state to pickup soda cans.
|
||||
*/
|
||||
class PrepareToPickup : public frc::CommandGroup {
|
||||
public:
|
||||
PrepareToPickup();
|
||||
};
|
||||
@@ -1,44 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/PIDController.h>
|
||||
#include <frc/PIDOutput.h>
|
||||
#include <frc/PIDSource.h>
|
||||
#include <frc/commands/Command.h>
|
||||
|
||||
/**
|
||||
* Drive until the robot is the given distance away from the box. Uses a local
|
||||
* PID controller to run a simple PID loop that is only enabled while this
|
||||
* command is running. The input is the averaged values of the left and right
|
||||
* encoders.
|
||||
*/
|
||||
class SetDistanceToBox : public frc::Command {
|
||||
public:
|
||||
explicit SetDistanceToBox(double distance);
|
||||
void Initialize() override;
|
||||
bool IsFinished() override;
|
||||
void End() override;
|
||||
|
||||
class SetDistanceToBoxPIDSource : public frc::PIDSource {
|
||||
public:
|
||||
virtual ~SetDistanceToBoxPIDSource() = default;
|
||||
double PIDGet() override;
|
||||
};
|
||||
|
||||
class SetDistanceToBoxPIDOutput : public frc::PIDOutput {
|
||||
public:
|
||||
virtual ~SetDistanceToBoxPIDOutput() = default;
|
||||
void PIDWrite(double d) override;
|
||||
};
|
||||
|
||||
private:
|
||||
SetDistanceToBoxPIDSource m_source;
|
||||
SetDistanceToBoxPIDOutput m_output;
|
||||
frc::PIDController m_pid{-2, 0, 0, &m_source, &m_output};
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/commands/Command.h>
|
||||
|
||||
/**
|
||||
* Move the elevator to a given location. This command finishes when it is
|
||||
* within
|
||||
* the tolerance, but leaves the PID loop running to maintain the position.
|
||||
* Other
|
||||
* commands using the elevator should make sure they disable PID!
|
||||
*/
|
||||
class SetElevatorSetpoint : public frc::Command {
|
||||
public:
|
||||
explicit SetElevatorSetpoint(double setpoint);
|
||||
void Initialize() override;
|
||||
bool IsFinished() override;
|
||||
|
||||
private:
|
||||
double m_setpoint;
|
||||
};
|
||||
@@ -1,25 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/commands/Command.h>
|
||||
|
||||
/**
|
||||
* Move the wrist to a given angle. This command finishes when it is within
|
||||
* the tolerance, but leaves the PID loop running to maintain the position.
|
||||
* Other commands using the wrist should make sure they disable PID!
|
||||
*/
|
||||
class SetWristSetpoint : public frc::Command {
|
||||
public:
|
||||
explicit SetWristSetpoint(double setpoint);
|
||||
void Initialize() override;
|
||||
bool IsFinished() override;
|
||||
|
||||
private:
|
||||
double m_setpoint;
|
||||
};
|
||||
@@ -1,21 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/commands/Command.h>
|
||||
|
||||
/**
|
||||
* Have the robot drive tank style using the PS3 Joystick until interrupted.
|
||||
*/
|
||||
class TankDriveWithJoystick : public frc::Command {
|
||||
public:
|
||||
TankDriveWithJoystick();
|
||||
void Execute() override;
|
||||
bool IsFinished() override;
|
||||
void End() override;
|
||||
};
|
||||
@@ -1,51 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/DigitalInput.h>
|
||||
#include <frc/PWMVictorSPX.h>
|
||||
#include <frc/commands/Subsystem.h>
|
||||
|
||||
/**
|
||||
* The claw subsystem is a simple system with a motor for opening and closing.
|
||||
* If using stronger motors, you should probably use a sensor so that the
|
||||
* motors don't stall.
|
||||
*/
|
||||
class Claw : public frc::Subsystem {
|
||||
public:
|
||||
Claw();
|
||||
|
||||
void InitDefaultCommand() override;
|
||||
|
||||
/**
|
||||
* Set the claw motor to move in the open direction.
|
||||
*/
|
||||
void Open();
|
||||
|
||||
/**
|
||||
* Set the claw motor to move in the close direction.
|
||||
*/
|
||||
void Close();
|
||||
|
||||
/**
|
||||
* Stops the claw motor from moving.
|
||||
*/
|
||||
void Stop();
|
||||
|
||||
/**
|
||||
* Return true when the robot is grabbing an object hard enough
|
||||
* to trigger the limit switch.
|
||||
*/
|
||||
bool IsGripping();
|
||||
|
||||
void Log();
|
||||
|
||||
private:
|
||||
frc::PWMVictorSPX m_motor{7};
|
||||
frc::DigitalInput m_contact{5};
|
||||
};
|
||||
@@ -1,84 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/AnalogGyro.h>
|
||||
#include <frc/AnalogInput.h>
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/PWMVictorSPX.h>
|
||||
#include <frc/SpeedControllerGroup.h>
|
||||
#include <frc/commands/Subsystem.h>
|
||||
#include <frc/drive/DifferentialDrive.h>
|
||||
|
||||
namespace frc {
|
||||
class Joystick;
|
||||
} // namespace frc
|
||||
|
||||
/**
|
||||
* The DriveTrain subsystem incorporates the sensors and actuators attached to
|
||||
* the robots chassis. These include four drive motors, a left and right encoder
|
||||
* and a gyro.
|
||||
*/
|
||||
class DriveTrain : public frc::Subsystem {
|
||||
public:
|
||||
DriveTrain();
|
||||
|
||||
/**
|
||||
* When no other command is running let the operator drive around
|
||||
* using the PS3 joystick.
|
||||
*/
|
||||
void InitDefaultCommand() override;
|
||||
|
||||
/**
|
||||
* The log method puts interesting information to the SmartDashboard.
|
||||
*/
|
||||
void Log();
|
||||
|
||||
/**
|
||||
* Tank style driving for the DriveTrain.
|
||||
* @param left Speed in range [-1,1]
|
||||
* @param right Speed in range [-1,1]
|
||||
*/
|
||||
void Drive(double left, double right);
|
||||
|
||||
/**
|
||||
* @return The robots heading in degrees.
|
||||
*/
|
||||
double GetHeading();
|
||||
|
||||
/**
|
||||
* Reset the robots sensors to the zero states.
|
||||
*/
|
||||
void Reset();
|
||||
|
||||
/**
|
||||
* @return The distance driven (average of left and right encoders).
|
||||
*/
|
||||
double GetDistance();
|
||||
|
||||
/**
|
||||
* @return The distance to the obstacle detected by the rangefinder.
|
||||
*/
|
||||
double GetDistanceToObstacle();
|
||||
|
||||
private:
|
||||
frc::PWMVictorSPX m_frontLeft{1};
|
||||
frc::PWMVictorSPX m_rearLeft{2};
|
||||
frc::SpeedControllerGroup m_left{m_frontLeft, m_rearLeft};
|
||||
|
||||
frc::PWMVictorSPX m_frontRight{3};
|
||||
frc::PWMVictorSPX m_rearRight{4};
|
||||
frc::SpeedControllerGroup m_right{m_frontRight, m_rearRight};
|
||||
|
||||
frc::DifferentialDrive m_robotDrive{m_left, m_right};
|
||||
|
||||
frc::Encoder m_leftEncoder{1, 2};
|
||||
frc::Encoder m_rightEncoder{3, 4};
|
||||
frc::AnalogInput m_rangefinder{6};
|
||||
frc::AnalogGyro m_gyro{1};
|
||||
};
|
||||
@@ -1,59 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/AnalogPotentiometer.h>
|
||||
#include <frc/PWMVictorSPX.h>
|
||||
#include <frc/commands/PIDSubsystem.h>
|
||||
|
||||
/**
|
||||
* The elevator subsystem uses PID to go to a given height. Unfortunately, in
|
||||
* it's current
|
||||
* state PID values for simulation are different than in the real world do to
|
||||
* minor differences.
|
||||
*/
|
||||
class Elevator : public frc::PIDSubsystem {
|
||||
public:
|
||||
Elevator();
|
||||
|
||||
void InitDefaultCommand() override;
|
||||
|
||||
/**
|
||||
* The log method puts interesting information to the SmartDashboard.
|
||||
*/
|
||||
void Log();
|
||||
|
||||
/**
|
||||
* Use the potentiometer as the PID sensor. This method is automatically
|
||||
* called by the subsystem.
|
||||
*/
|
||||
double ReturnPIDInput() override;
|
||||
|
||||
/**
|
||||
* Use the motor as the PID output. This method is automatically called
|
||||
* by
|
||||
* the subsystem.
|
||||
*/
|
||||
void UsePIDOutput(double d) override;
|
||||
|
||||
private:
|
||||
frc::PWMVictorSPX m_motor{5};
|
||||
|
||||
// Conversion value of potentiometer varies between the real world and
|
||||
// simulation
|
||||
#ifndef SIMULATION
|
||||
frc::AnalogPotentiometer m_pot{2, -2.0 / 5};
|
||||
#else
|
||||
frc::AnalogPotentiometer m_pot{2}; // Defaults to meters
|
||||
#endif
|
||||
|
||||
static constexpr double kP_real = 4;
|
||||
static constexpr double kI_real = 0.07;
|
||||
static constexpr double kP_simulation = 18;
|
||||
static constexpr double kI_simulation = 0.2;
|
||||
};
|
||||
@@ -1,55 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <frc/AnalogPotentiometer.h>
|
||||
#include <frc/PWMVictorSPX.h>
|
||||
#include <frc/commands/PIDSubsystem.h>
|
||||
|
||||
/**
|
||||
* The wrist subsystem is like the elevator, but with a rotational joint instead
|
||||
* of a linear joint.
|
||||
*/
|
||||
class Wrist : public frc::PIDSubsystem {
|
||||
public:
|
||||
Wrist();
|
||||
|
||||
void InitDefaultCommand() override;
|
||||
|
||||
/**
|
||||
* The log method puts interesting information to the SmartDashboard.
|
||||
*/
|
||||
void Log();
|
||||
|
||||
/**
|
||||
* Use the potentiometer as the PID sensor. This method is automatically
|
||||
* called by the subsystem.
|
||||
*/
|
||||
double ReturnPIDInput() override;
|
||||
|
||||
/**
|
||||
* Use the motor as the PID output. This method is automatically called
|
||||
* by
|
||||
* the subsystem.
|
||||
*/
|
||||
void UsePIDOutput(double d) override;
|
||||
|
||||
private:
|
||||
frc::PWMVictorSPX m_motor{6};
|
||||
|
||||
// Conversion value of potentiometer varies between the real world and
|
||||
// simulation
|
||||
#ifndef SIMULATION
|
||||
frc::AnalogPotentiometer m_pot{3, -270.0 / 5};
|
||||
#else
|
||||
frc::AnalogPotentiometer m_pot{3}; // Defaults to degrees
|
||||
#endif
|
||||
|
||||
static constexpr double kP_real = 1;
|
||||
static constexpr double kP_simulation = 0.05;
|
||||
};
|
||||
Reference in New Issue
Block a user