mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Ran format.py after writing unit tests for and fixing bugs in it (#239)
This commit is contained in:
committed by
Peter Johnson
parent
ac9b6f7b18
commit
659dbef751
@@ -19,7 +19,7 @@ constexpr double IterativeRobot::kDefaultPeriod;
|
||||
* Provide an alternate "main loop" via StartCompetition().
|
||||
*
|
||||
* This specific StartCompetition() implements "main loop" behaviour synced with
|
||||
* the DS packets
|
||||
* the DS packets.
|
||||
*/
|
||||
void IterativeRobot::StartCompetition() {
|
||||
HAL_Report(HALUsageReporting::kResourceType_Framework,
|
||||
@@ -164,12 +164,14 @@ void IterativeRobot::TestInit() {
|
||||
/**
|
||||
* Periodic code for all modes should go here.
|
||||
*
|
||||
* This function is called each time a new packet is received from the driver station.
|
||||
* This function is called each time a new packet is received from the driver
|
||||
* station.
|
||||
*
|
||||
* Packets are received approximately every 20ms. Fixed loop timing is not guaranteed due to
|
||||
* network timing variability and the function may not be called at all if the Driver Station is
|
||||
* disconnected. For most use cases the variable timing will not be an issue. If your code does
|
||||
* require guaranteed fixed periodic timing, consider using Notifier or PIDController instead.
|
||||
* Packets are received approximately every 20ms. Fixed loop timing is not
|
||||
* guaranteed due to network timing variability and the function may not be
|
||||
* called at all if the Driver Station is disconnected. For most use cases the
|
||||
* variable timing will not be an issue. If your code does require guaranteed
|
||||
* fixed periodic timing, consider using Notifier or PIDController instead.
|
||||
*/
|
||||
void IterativeRobot::RobotPeriodic() {
|
||||
static bool firstRun = true;
|
||||
@@ -182,13 +184,15 @@ void IterativeRobot::RobotPeriodic() {
|
||||
/**
|
||||
* Periodic code for disabled mode should go here.
|
||||
*
|
||||
* Users should override this method for code which will be called each time a new packet is
|
||||
* received from the driver station and the robot is in disabled mode.
|
||||
* Users should override this method for code which will be called each time a
|
||||
* new packet is received from the driver station and the robot is in disabled
|
||||
* mode.
|
||||
*
|
||||
* Packets are received approximately every 20ms. Fixed loop timing is not guaranteed due to
|
||||
* network timing variability and the function may not be called at all if the Driver Station is
|
||||
* disconnected. For most use cases the variable timing will not be an issue. If your code does
|
||||
* require guaranteed fixed periodic timing, consider using Notifier or PIDController instead.
|
||||
* Packets are received approximately every 20ms. Fixed loop timing is not
|
||||
* guaranteed due to network timing variability and the function may not be
|
||||
* called at all if the Driver Station is disconnected. For most use cases the
|
||||
* variable timing will not be an issue. If your code does require guaranteed
|
||||
* fixed periodic timing, consider using Notifier or PIDController instead.
|
||||
*/
|
||||
void IterativeRobot::DisabledPeriodic() {
|
||||
static bool firstRun = true;
|
||||
@@ -201,13 +205,15 @@ void IterativeRobot::DisabledPeriodic() {
|
||||
/**
|
||||
* Periodic code for autonomous mode should go here.
|
||||
*
|
||||
* Users should override this method for code which will be called each time a new packet is
|
||||
* received from the driver station and the robot is in autonomous mode.
|
||||
* Users should override this method for code which will be called each time a
|
||||
* new packet is received from the driver station and the robot is in autonomous
|
||||
* mode.
|
||||
*
|
||||
* Packets are received approximately every 20ms. Fixed loop timing is not guaranteed due to
|
||||
* network timing variability and the function may not be called at all if the Driver Station is
|
||||
* disconnected. For most use cases the variable timing will not be an issue. If your code does
|
||||
* require guaranteed fixed periodic timing, consider using Notifier or PIDController instead.
|
||||
* Packets are received approximately every 20ms. Fixed loop timing is not
|
||||
* guaranteed due to network timing variability and the function may not be
|
||||
* called at all if the Driver Station is disconnected. For most use cases the
|
||||
* variable timing will not be an issue. If your code does require guaranteed
|
||||
* fixed periodic timing, consider using Notifier or PIDController instead.
|
||||
*/
|
||||
void IterativeRobot::AutonomousPeriodic() {
|
||||
static bool firstRun = true;
|
||||
@@ -220,13 +226,15 @@ void IterativeRobot::AutonomousPeriodic() {
|
||||
/**
|
||||
* Periodic code for teleop mode should go here.
|
||||
*
|
||||
* Users should override this method for code which will be called each time a new packet is
|
||||
* received from the driver station and the robot is in teleop mode.
|
||||
* Users should override this method for code which will be called each time a
|
||||
* new packet is received from the driver station and the robot is in teleop
|
||||
* mode.
|
||||
*
|
||||
* Packets are received approximately every 20ms. Fixed loop timing is not guaranteed due to
|
||||
* network timing variability and the function may not be called at all if the Driver Station is
|
||||
* disconnected. For most use cases the variable timing will not be an issue. If your code does
|
||||
* require guaranteed fixed periodic timing, consider using Notifier or PIDController instead.
|
||||
* Packets are received approximately every 20ms. Fixed loop timing is not
|
||||
* guaranteed due to network timing variability and the function may not be
|
||||
* called at all if the Driver Station is disconnected. For most use cases the
|
||||
* variable timing will not be an issue. If your code does require guaranteed
|
||||
* fixed periodic timing, consider using Notifier or PIDController instead.
|
||||
*/
|
||||
void IterativeRobot::TeleopPeriodic() {
|
||||
static bool firstRun = true;
|
||||
@@ -239,13 +247,14 @@ void IterativeRobot::TeleopPeriodic() {
|
||||
/**
|
||||
* Periodic code for test mode should go here.
|
||||
*
|
||||
* Users should override this method for code which will be called each time a new packet is
|
||||
* received from the driver station and the robot is in test mode.
|
||||
* Users should override this method for code which will be called each time a
|
||||
* new packet is received from the driver station and the robot is in test mode.
|
||||
*
|
||||
* Packets are received approximately every 20ms. Fixed loop timing is not guaranteed due to
|
||||
* network timing variability and the function may not be called at all if the Driver Station is
|
||||
* disconnected. For most use cases the variable timing will not be an issue. If your code does
|
||||
* require guaranteed fixed periodic timing, consider using Notifier or PIDController instead.
|
||||
* Packets are received approximately every 20ms. Fixed loop timing is not
|
||||
* guaranteed due to network timing variability and the function may not be
|
||||
* called at all if the Driver Station is disconnected. For most use cases the
|
||||
* variable timing will not be an issue. If your code does require guaranteed
|
||||
* fixed periodic timing, consider using Notifier or PIDController instead.
|
||||
*/
|
||||
void IterativeRobot::TestPeriodic() {
|
||||
static bool firstRun = true;
|
||||
|
||||
Reference in New Issue
Block a user