Allows two controllers to swap between "Driver" and "Operator" control schemes on the fly by swapping the m_driverController and m_operatorController objects.
More...
#include <swappable_controllers_subsystem.h>
|
void | UpdateVibration () |
| Update vibration on both controllers based on their active vibration models.
|
|
Allows two controllers to swap between "Driver" and "Operator" control schemes on the fly by swapping the m_driverController and m_operatorController objects.
◆ SwappableControllersSubsystem() [1/2]
argos_lib::SwappableControllersSubsystem::SwappableControllersSubsystem |
( |
| ) |
|
|
delete |
◆ SwappableControllersSubsystem() [2/2]
SwappableControllersSubsystem::SwappableControllersSubsystem |
( |
int |
driverControllerPort, |
|
|
int |
operatorControllerPort |
|
) |
| |
Construct a new Swappable Controllers Subsystem object with two controllers.
- Parameters
-
driverControllerPort | Index of driver controller |
operatorControllerPort | Index of operator controller |
◆ DriverController()
Get reference to active driver controller.
- Returns
- Active driver controller based on swaps up to this point
◆ OperatorController()
XboxController & SwappableControllersSubsystem::OperatorController |
( |
| ) |
|
Get reference to active operator controller.
- Returns
- Active operator controller based on swaps up to this point
◆ Periodic()
void SwappableControllersSubsystem::Periodic |
( |
| ) |
|
|
override |
Will be called periodically whenever the CommandScheduler runs.
Will be called periodically whenever the CommandScheduler runs.
◆ Swap()
void SwappableControllersSubsystem::Swap |
( |
| ) |
|
Swap driver and operator controller rolls.
◆ UpdateVibration()
void SwappableControllersSubsystem::UpdateVibration |
( |
| ) |
|
|
private |
Update vibration on both controllers based on their active vibration models.
◆ VibrateAll()
Change vibration model for both controllers.
◆ m_driverController
Managed driver controller.
◆ m_operatorController
Managed operator controller.
◆ m_swapped
bool argos_lib::SwappableControllersSubsystem::m_swapped |
|
private |
Indicates if controllers are currently swapped.
The documentation for this class was generated from the following files: