mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Deprecate IterativeRobot in favor of TimedRobot (#1341)
Since https://github.com/wpilibsuite/allwpilib/issues/786 has been closed as not a legitimate concern, there is now no reason to use IterativeRobot over TimedRobot. It's a drop-in replacement that's strictly an improvement in terms of execution jitter. To migrate, one simply has to replace the IterativeRobot subclass in their robot code with TimedRobot.
This commit is contained in:
committed by
Peter Johnson
parent
f1056efa01
commit
81498e6af9
@@ -22,6 +22,9 @@ namespace frc {
|
||||
*/
|
||||
class IterativeRobot : public IterativeRobotBase {
|
||||
public:
|
||||
WPI_DEPRECATED(
|
||||
"Use TimedRobot instead. It's a drop-in replacement that provides more "
|
||||
"regular execution periods.")
|
||||
IterativeRobot();
|
||||
virtual ~IterativeRobot() = default;
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ import edu.wpi.first.hal.HAL;
|
||||
*
|
||||
* <p>periodic() functions from the base class are called each time a new packet is received from
|
||||
* the driver station.
|
||||
*
|
||||
* @deprecated Use TimedRobot instead. It's a drop-in replacement that provides more regular
|
||||
* execution periods.
|
||||
*/
|
||||
@Deprecated
|
||||
public class IterativeRobot extends IterativeRobotBase {
|
||||
private static final double kPacketPeriod = 0.02;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user