CTRE_Phoenix 5.20.2
|
#include <RCRadio3Ch.h>
Inherits ctre::phoenix::tasking::IProcessable.
Public Types | |
enum | Channel { Channel1 , Channel2 , Channel3 } |
enum | Status { LossOfCAN , LossOfPwm , Okay } |
Public Member Functions | |
RCRadio3Ch (ctre::phoenix::CANifier *canifier) | |
double | GetDutyCycleUs (Channel channel) |
double | GetDutyCyclePerc (Channel channel) |
bool | GetSwitchValue (Channel channel) |
double | GetPeriodUs (Channel channel) |
void | Process () |
virtual void | Process ()=0 |
Public Attributes | |
Status | CurrentStatus = Status::Okay |
Class to convert RC PWM signals into CAN signals using CANifier
CANifier PWM Channel
Enumerator | |
---|---|
Channel1 | PWM Channel 1 |
Channel2 | PWM Channel 2 |
Channel3 | PWM Channel 3 |
ctre::phoenix::RCRadio3Ch::RCRadio3Ch | ( | ctre::phoenix::CANifier * | canifier | ) |
Constructor for RCRadio3Ch
canifier | reference to CANifier to use |
double ctre::phoenix::RCRadio3Ch::GetDutyCyclePerc | ( | Channel | channel | ) |
Gets the percent duty cycle of specified channel
channel | channel to read |
double ctre::phoenix::RCRadio3Ch::GetDutyCycleUs | ( | Channel | channel | ) |
Gets the microsecond duty cycle of specified channel
channel | channel to read |
double ctre::phoenix::RCRadio3Ch::GetPeriodUs | ( | Channel | channel | ) |
Gets the period of the pwm signal of a channel
channel | channel to read |
bool ctre::phoenix::RCRadio3Ch::GetSwitchValue | ( | Channel | channel | ) |
Gets whether a switch is on or off for a channel
channel | channel to read |
|
virtual |
Call this once every loop, it processes the incoming CANifier signals
Implements ctre::phoenix::tasking::IProcessable.