mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[wpilib] Rename DriverStation::IsOperatorControl() to IsTeleop() (#3505)
This commit is contained in:
@@ -195,16 +195,35 @@ class DriverStation {
|
||||
* Check if the DS is commanding teleop mode.
|
||||
*
|
||||
* @return True if the robot is being commanded to be in teleop mode
|
||||
* @deprecated Use IsTeleop() instead.
|
||||
*/
|
||||
WPI_DEPRECATED("Use IsTeleop() instead")
|
||||
static bool IsOperatorControl();
|
||||
|
||||
/**
|
||||
* Check if the DS is commanding teleop mode.
|
||||
*
|
||||
* @return True if the robot is being commanded to be in teleop mode
|
||||
*/
|
||||
static bool IsTeleop();
|
||||
|
||||
/**
|
||||
* Check if the DS is commanding teleop mode and if it has enabled the robot.
|
||||
*
|
||||
* @return True if the robot is being commanded to be in teleop mode and
|
||||
* enabled.
|
||||
* @deprecated Use IsTeleopEnabled() instead.
|
||||
*/
|
||||
WPI_DEPRECATED("Use IsTeleopEnabled() instead")
|
||||
static bool IsOperatorControlEnabled();
|
||||
|
||||
/**
|
||||
* Check if the DS is commanding teleop mode and if it has enabled the robot.
|
||||
*
|
||||
* @return True if the robot is being commanded to be in teleop mode and
|
||||
* enabled.
|
||||
*/
|
||||
static bool IsOperatorControlEnabled();
|
||||
static bool IsTeleopEnabled();
|
||||
|
||||
/**
|
||||
* Check if the DS is commanding test mode.
|
||||
@@ -377,9 +396,20 @@ class DriverStation {
|
||||
*
|
||||
* @param entering If true, starting teleop code; if false, leaving teleop
|
||||
* code.
|
||||
* @deprecated Use InTeleop() instead.
|
||||
*/
|
||||
WPI_DEPRECATED("Use InTeleop() instead")
|
||||
static void InOperatorControl(bool entering);
|
||||
|
||||
/**
|
||||
* Only to be used to tell the Driver Station what code you claim to be
|
||||
* executing for diagnostic purposes only.
|
||||
*
|
||||
* @param entering If true, starting teleop code; if false, leaving teleop
|
||||
* code.
|
||||
*/
|
||||
static void InTeleop(bool entering);
|
||||
|
||||
/**
|
||||
* Only to be used to tell the Driver Station what code you claim to be
|
||||
* executing for diagnostic purposes only.
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <hal/HALBase.h>
|
||||
#include <hal/Main.h>
|
||||
#include <wpi/condition_variable.h>
|
||||
#include <wpi/deprecated.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "frc/Errors.h"
|
||||
@@ -154,16 +155,36 @@ class RobotBase {
|
||||
*
|
||||
* @return True if the robot is currently operating in Tele-Op mode as
|
||||
* determined by the field controls.
|
||||
* @deprecated Use IsTeleop() instead.
|
||||
*/
|
||||
WPI_DEPRECATED("Use IsTeleop() instead")
|
||||
bool IsOperatorControl() const;
|
||||
|
||||
/**
|
||||
* Determine if the robot is currently in Operator Control mode.
|
||||
*
|
||||
* @return True if the robot is currently operating in Tele-Op mode as
|
||||
* determined by the field controls.
|
||||
*/
|
||||
bool IsTeleop() const;
|
||||
|
||||
/**
|
||||
* Determine if the robot is current in Operator Control mode and enabled.
|
||||
*
|
||||
* @return True if the robot is currently operating in Tele-Op mode while
|
||||
* enabled as determined by the field-controls.
|
||||
* @deprecated Use IsTeleopEnabled() instead.
|
||||
*/
|
||||
WPI_DEPRECATED("Use IsTeleopEnabled() instead")
|
||||
bool IsOperatorControlEnabled() const;
|
||||
|
||||
/**
|
||||
* Determine if the robot is current in Operator Control mode and enabled.
|
||||
*
|
||||
* @return True if the robot is currently operating in Tele-Op mode while
|
||||
* wnabled as determined by the field-controls.
|
||||
*/
|
||||
bool IsOperatorControlEnabled() const;
|
||||
bool IsTeleopEnabled() const;
|
||||
|
||||
/**
|
||||
* Determine if the robot is currently in Test mode.
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
namespace frc {
|
||||
|
||||
class RobotState {
|
||||
@@ -13,7 +15,9 @@ class RobotState {
|
||||
static bool IsDisabled();
|
||||
static bool IsEnabled();
|
||||
static bool IsEStopped();
|
||||
WPI_DEPRECATED("Use IsTeleop() instead")
|
||||
static bool IsOperatorControl();
|
||||
static bool IsTeleop();
|
||||
static bool IsAutonomous();
|
||||
static bool IsTest();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user