mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Add new C++ Command framework (#1785)
This is the C++ version of #1682. The old command framework is still available, but will be deprecated. Due to name conflicts, the new framework is in the frc2 namespace. Eventually (after the old command framework is removed in a future year) it will be moved into the main frc namespace.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/Spark.h>
|
||||
#include <frc/PWMVictorSPX.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/controller/PIDController.h>
|
||||
#include <frc/trajectory/TrapezoidProfile.h>
|
||||
@@ -43,7 +43,7 @@ class Robot : public frc::TimedRobot {
|
||||
private:
|
||||
frc::Joystick m_joystick{1};
|
||||
frc::Encoder m_encoder{1, 2};
|
||||
frc::Spark m_motor{1};
|
||||
frc::PWMVictorSPX m_motor{1};
|
||||
frc2::PIDController m_controller{1.3, 0.0, 0.7, kDt};
|
||||
|
||||
frc::TrapezoidProfile::Constraints m_constraints{1.75_mps, 0.75_mps_sq};
|
||||
|
||||
Reference in New Issue
Block a user