mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Replace IterativeRobot in examples with TimedRobot (#1310)
Fixes #1309.
This commit is contained in:
committed by
Peter Johnson
parent
59386635e7
commit
bedef476fd
@@ -8,17 +8,17 @@
|
||||
#include <array>
|
||||
|
||||
#include <frc/AnalogInput.h>
|
||||
#include <frc/IterativeRobot.h>
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/PIDController.h>
|
||||
#include <frc/Spark.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
|
||||
/**
|
||||
* This is a sample program to demonstrate how to use a soft potentiometer and a
|
||||
* PID Controller to reach and maintain position setpoints on an elevator
|
||||
* mechanism.
|
||||
*/
|
||||
class Robot : public frc::IterativeRobot {
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
void RobotInit() override { m_pidController.SetInputRange(0, 5); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user