2013-12-15 18:30:16 -05:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2018-01-02 09:20:21 -08:00
|
|
|
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
|
2013-12-15 18:30:16 -05:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
2016-01-02 03:02:34 -08:00
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
2013-12-15 18:30:16 -05:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2016-01-02 03:02:34 -08:00
|
|
|
|
2014-05-02 17:54:01 -04:00
|
|
|
#pragma once
|
2013-12-15 18:30:16 -05:00
|
|
|
|
2018-07-20 00:03:45 -07:00
|
|
|
#include "frc/IterativeRobotBase.h"
|
2013-12-15 18:30:16 -05:00
|
|
|
|
2016-11-01 22:33:12 -07:00
|
|
|
namespace frc {
|
|
|
|
|
|
2013-12-15 18:30:16 -05:00
|
|
|
/**
|
2017-07-08 10:50:56 -04:00
|
|
|
* IterativeRobot implements the IterativeRobotBase robot program framework.
|
2015-06-25 15:07:55 -04:00
|
|
|
*
|
|
|
|
|
* The IterativeRobot class is intended to be subclassed by a user creating a
|
|
|
|
|
* robot program.
|
|
|
|
|
*
|
2017-07-08 10:50:56 -04:00
|
|
|
* Periodic() functions from the base class are called each time a new packet is
|
|
|
|
|
* received from the driver station.
|
2013-12-15 18:30:16 -05:00
|
|
|
*/
|
2017-07-08 10:50:56 -04:00
|
|
|
class IterativeRobot : public IterativeRobotBase {
|
2015-06-25 15:07:55 -04:00
|
|
|
public:
|
2018-10-04 01:02:07 -07:00
|
|
|
WPI_DEPRECATED(
|
|
|
|
|
"Use TimedRobot instead. It's a drop-in replacement that provides more "
|
|
|
|
|
"regular execution periods.")
|
2017-07-08 10:50:56 -04:00
|
|
|
IterativeRobot();
|
2017-07-01 01:12:28 -04:00
|
|
|
virtual ~IterativeRobot() = default;
|
2013-12-15 18:30:16 -05:00
|
|
|
|
2018-09-24 00:08:25 -07:00
|
|
|
IterativeRobot(IterativeRobot&&) = default;
|
|
|
|
|
IterativeRobot& operator=(IterativeRobot&&) = default;
|
|
|
|
|
|
2018-05-31 20:47:15 -07:00
|
|
|
/**
|
|
|
|
|
* Provide an alternate "main loop" via StartCompetition().
|
|
|
|
|
*
|
|
|
|
|
* This specific StartCompetition() implements "main loop" behaviour synced
|
|
|
|
|
* with the DS packets.
|
|
|
|
|
*/
|
2017-07-08 10:50:56 -04:00
|
|
|
void StartCompetition() override;
|
2013-12-15 18:30:16 -05:00
|
|
|
};
|
2016-11-01 22:33:12 -07:00
|
|
|
|
|
|
|
|
} // namespace frc
|