Class to control a simulated analog gyro.
More...
#include <frc/simulation/AnalogGyroSim.h>
Class to control a simulated analog gyro.
◆ AnalogGyroSim() [1/2]
frc::sim::AnalogGyroSim::AnalogGyroSim |
( |
const AnalogGyro & |
gyro | ) |
|
|
explicit |
◆ AnalogGyroSim() [2/2]
frc::sim::AnalogGyroSim::AnalogGyroSim |
( |
int |
channel | ) |
|
|
explicit |
Constructs from an analog input channel number.
- Parameters
-
◆ GetAngle()
double frc::sim::AnalogGyroSim::GetAngle |
( |
| ) |
const |
Get the current angle of the gyro.
- Returns
- the angle measured by the gyro
◆ GetInitialized()
bool frc::sim::AnalogGyroSim::GetInitialized |
( |
| ) |
const |
Check if the gyro is initialized.
- Returns
- true if initialized
◆ GetRate()
double frc::sim::AnalogGyroSim::GetRate |
( |
| ) |
const |
Get the rate of angle change on this gyro.
- Returns
- the rate
◆ RegisterAngleCallback()
Register a callback on the angle.
- Parameters
-
callback | the callback that will be called whenever the angle changes |
initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterInitializedCallback()
Register a callback on whether the gyro is initialized.
- Parameters
-
callback | the callback that will be called whenever the gyro is initialized |
initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterRateCallback()
Register a callback on the rate.
- Parameters
-
callback | the callback that will be called whenever the rate changes |
initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ ResetData()
void frc::sim::AnalogGyroSim::ResetData |
( |
| ) |
|
Reset all simulation data for this object.
◆ SetAngle()
void frc::sim::AnalogGyroSim::SetAngle |
( |
double |
angle | ) |
|
Change the angle measured by the gyro.
- Parameters
-
◆ SetInitialized()
void frc::sim::AnalogGyroSim::SetInitialized |
( |
bool |
initialized | ) |
|
Set whether this gyro is initialized.
- Parameters
-
◆ SetRate()
void frc::sim::AnalogGyroSim::SetRate |
( |
double |
rate | ) |
|
Change the rate of the gyro.
- Parameters
-
The documentation for this class was generated from the following file: