Frc driver station tutorial
SetGlobalError (Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) Static Public Member Functions inherited from frc::ErrorBase ReportError (bool isError, int code, const wpi::Twine &error, const wpi::Twine &location, const wpi::Twine &stack) Report a warning to the DriverStation messages window. Report an error to the DriverStation messages window. Return a reference to the singleton DriverStation.
#FRC DRIVER STATION TUTORIAL CODE#
SetWPIError (const wpi::Twine &errorMessage, Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) constĬheck if the current error code represents a fatal error. SetErrorRange (Error::Code code, int32_t minRange, int32_t maxRange, int32_t requestedValue, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const Set the current error information associated with this sensor. SetError (Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const Set the current error information associated from the nivision Imaq API. SetImaqError (int success, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const Set error information associated with a C library call that set an error to the "errno" global variable. SetErrnoError (const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const Public Member Functions inherited from frc::ErrorBaseĬlear the current error information associated with this sensor. More.įorces WaitForData() to return immediately. Only to be used to tell the Driver Station what code you claim to be executing for diagnostic purposes only.
Wait until a new packet comes from the driver station, or wait for a timeout. Wait until a new packet comes from the driver station. Return the driver station location on the field. Return the alliance that the driver station says it is on. Returns the number of times the current match has been replayed from the FMS. Returns the match number provided by the FMS. Returns the type of match being played provided by the FMS. Returns the name of the competition event provided by the FMS. Returns the game specific message provided by the FMS. Is the driver station attached to a Field Management System? More. Has a new control packet from the driver station arrived since the last time this function was called? More. More.Ĭheck if the DS is commanding test mode. More.Ĭheck if the DS is commanding teleop mode.
More.Ĭheck if the DS is commanding autonomous mode. More.Ĭheck if the DS has enabled the robot. Returns the types of Axes on a given joystick port. GetJoystickAxisType (int stick, int axis) const Returns the name of the joystick at the given port. Returns the type of joystick at a given port. Returns a boolean indicating if the controller is an xbox controller. Returns the number of buttons on a given joystick port. Returns the number of POVs on a given joystick port. Returns the number of axes on a given joystick port. The state of the buttons on the joystick. Whether one joystick button was released since the last check. GetStickButtonReleased (int stick, int button) Whether one joystick button was pressed since the last check. GetStickButtonPressed (int stick, int button) DriverStation (const DriverStation &)=delete