![]() |
2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
|
Namespaces | |
| namespace | cancoder_config |
| namespace | falcon_config |
| namespace | status_frame_config |
| namespace | swerve |
| namespace | talonsrx_config |
Classes | |
| struct | CANAddress |
| struct | ClosedLoopSensorConversions |
| Conversion factors to aid displaying sensor values as meaningful numbers. More... | |
| class | Debouncer |
| struct | DebounceSettings |
| class | EdgeDetector |
| class | HysteresisFilter |
| A simple hysteresis filter for giving a bool output for a threshold. More... | |
| struct | InterpMapPoint |
| Point that helps generate an interpolation map. More... | |
| class | InterpolationMap |
| Performs linear interpolation of a value based on a set of input->output mapping points. More... | |
| class | NTMotorPIDTuner |
| Allows user to set PID parameters from network tables and update the motor configurations on updates. Also monitors status information from motors to aid tuning. More... | |
| class | NTSubscriber |
| Subscribes to Network Tables entry updates and calls a specified callback to use the new value. More... | |
| class | SwapControllersCommand |
| Swaps rolls of two controllers. Useful if one controller breaks during a match. More... | |
| class | SwappableControllersSubsystem |
| Allows two controllers to swap between "Driver" and "Operator" control schemes on the fly by swapping the m_driverController and m_operatorController objects. More... | |
| struct | VibrationStatus |
| Vibration percentages that can be sent to controller for user feedback. More... | |
| class | XboxController |
Typedefs | |
| using | VibrationModel = std::function< VibrationStatus()> |
Enumerations | |
| enum struct | RobotInstance { Competition , Practice } |
| Differentiates between practice robot and competition robot. More... | |
Functions | |
| RobotInstance | GetRobotInstance () |
| Detect robot instance. More... | |
| VibrationModel | VibrationOff () |
| Turn off vibration. More... | |
| VibrationModel | VibrationConstant (double intensity) |
| Set vibration to a constant value where left and right are the same intensity. More... | |
| VibrationModel | VibrationConstant (double intensityLeft, double intensityRight) |
| Set vibration to a constant value where left and right have discrete intensities. More... | |
| VibrationModel | VibrationSyncPulse (units::millisecond_t pulsePeriod, double intensityOn, double intensityOff=0.0) |
| Toggle vibration between intensityOn and intensityOff levels. Left and right have the same vibration intensity. More... | |
| VibrationModel | VibrationSyncWave (units::millisecond_t pulsePeriod, double intensityOn, double intensityOff=0.0) |
| Smoothly transition vibration between intensityOn and intensityOff levels. Left and right have the same vibration intensity. More... | |
| VibrationModel | VibrationAlternatePulse (units::millisecond_t pulsePeriod, double intensityOn, double intensityOff=0.0) |
| Toggle vibration between intensityOn and intensityOff levels. Left output is in intensityOn phase while right output is in intensityOff phase and vice-versa. More... | |
| VibrationModel | VibrationAlternateWave (units::millisecond_t pulsePeriod, double intensityOn, double intensityOff=0.0) |
| Smoothly transition vibration between intensityOn and intensityOff levels. Left output is in intensityOn phase while right output is in intensityOff phase and vice-versa. More... | |
| VibrationModel | TemporaryVibrationPattern (VibrationModel temporaryModel, units::millisecond_t temporaryModelDuration, VibrationModel lastingModel=VibrationOff()) |
| Run a vibration model for a specified duration, then run another model in perpetuity thereafter. More... | |
| template<typename T > | |
| static constexpr bool | InThreshold (const T value, const T target, const T threshold) |
| Detect if a value is within a threshold of a target value. More... | |
| template<class T , class V > | |
| constexpr bool | operator< (const InterpMapPoint< T, V > &a, const T &b) |
| template<class T , class V > | |
| constexpr bool | operator< (const T &a, const InterpMapPoint< T, V > &b) |
| template<class Callable > | |
| constexpr double | GetSensorConversionFactor (Callable toPhysicalUnitsFunction) |
| Generates a double value to convert raw sensor values to physical units represented as a double. More... | |
| using argos_lib::VibrationModel = typedef std::function<VibrationStatus()> |
|
strong |
| argos_lib::RobotInstance argos_lib::GetRobotInstance | ( | ) |
Detect robot instance.
|
constexpr |
Generates a double value to convert raw sensor values to physical units represented as a double.
| Callable | Function that generates a units value from a double |
| toPhysicalUnitsFunction | Conversion function |
|
staticconstexpr |
Detect if a value is within a threshold of a target value.
| T | Type that implements operator+(), operator-(), operator<=() and operator>=() |
| value | Value to check |
| target | Center of range |
| threshold | Allowable error from target |
|
constexpr |
|
constexpr |
| VibrationModel argos_lib::TemporaryVibrationPattern | ( | argos_lib::VibrationModel | temporaryModel, |
| units::millisecond_t | temporaryModelDuration, | ||
| argos_lib::VibrationModel | lastingModel = VibrationOff() |
||
| ) |
Run a vibration model for a specified duration, then run another model in perpetuity thereafter.
| temporaryModel | Model to run for the specified duration |
| temporaryModelDuration | Amount of time to run temporaryModel |
| lastingModel | Model to run forever after the specified duration |
| VibrationModel argos_lib::VibrationAlternatePulse | ( | units::millisecond_t | pulsePeriod, |
| double | intensityOn, | ||
| double | intensityOff = 0.0 |
||
| ) |
Toggle vibration between intensityOn and intensityOff levels. Left output is in intensityOn phase while right output is in intensityOff phase and vice-versa.
| pulsePeriod | Time to complete one intensityOn->intensityOff cycle |
| intensityOn | Vibration percent output when in intensityOn portion of cycle [0,1.0] |
| intensityOff | Vibration percent output when in intensityOff portion of cycle [0,1.0] |
| VibrationModel argos_lib::VibrationAlternateWave | ( | units::millisecond_t | pulsePeriod, |
| double | intensityOn, | ||
| double | intensityOff = 0.0 |
||
| ) |
Smoothly transition vibration between intensityOn and intensityOff levels. Left output is in intensityOn phase while right output is in intensityOff phase and vice-versa.
| pulsePeriod | Time to complete one intensityOn->intensityOff cycle |
| intensityOn | Vibration percent output when at peak of intensityOn portion of cycle [0,1.0] |
| intensityOff | Vibration percent output when in trough of intensityOff portion of cycle [0,1.0] |
| VibrationModel argos_lib::VibrationConstant | ( | double | intensity | ) |
Set vibration to a constant value where left and right are the same intensity.
| intensity | Percent vibration output [0,1.0] |
| VibrationModel argos_lib::VibrationConstant | ( | double | intensityLeft, |
| double | intensityRight | ||
| ) |
Set vibration to a constant value where left and right have discrete intensities.
| intensityLeft | Left vibration percent output [0,1.0] |
| intensityRight | Right vibration percent output [0,1.0] |
| VibrationModel argos_lib::VibrationOff | ( | ) |
Turn off vibration.
| VibrationModel argos_lib::VibrationSyncPulse | ( | units::millisecond_t | pulsePeriod, |
| double | intensityOn, | ||
| double | intensityOff = 0.0 |
||
| ) |
Toggle vibration between intensityOn and intensityOff levels. Left and right have the same vibration intensity.
| pulsePeriod | Time to complete one intensityOn->intensityOff cycle |
| intensityOn | Vibration percent output when in intensityOn portion of cycle [0,1.0] |
| intensityOff | Vibration percent output when in intensityOff portion of cycle [0,1.0] |
| VibrationModel argos_lib::VibrationSyncWave | ( | units::millisecond_t | pulsePeriod, |
| double | intensityOn, | ||
| double | intensityOff = 0.0 |
||
| ) |
Smoothly transition vibration between intensityOn and intensityOff levels. Left and right have the same vibration intensity.
| pulsePeriod | Time to complete one intensityOn->intensityOff cycle |
| intensityOn | Vibration percent output when at peak of intensityOn portion of cycle [0,1.0] |
| intensityOff | Vibration percent output when in trough of intensityOff portion of cycle [0,1.0] |