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
@@ -5,9 +5,9 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <frc/IterativeRobot.h>
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/Spark.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
|
||||
/**
|
||||
* This sample program shows how to control a motor using a joystick. In the
|
||||
@@ -17,7 +17,7 @@
|
||||
* Joystick analog values range from -1 to 1 and speed controller inputs as
|
||||
* range from -1 to 1 making it easy to work together.
|
||||
*/
|
||||
class Robot : public frc::IterativeRobot {
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
void TeleopPeriodic() override { m_motor.Set(m_stick.GetY()); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user