pub struct Rc { /* private fields */ }Implementations§
Source§impl Rc
impl Rc
pub fn param_change_callback(&mut self, param_id: ParamId, params: &Params)
pub fn receive(&mut self, packet: &RcPacket)
pub fn check_rc_health(&self, now_us: u64, params: &Params) -> bool
pub fn run( &mut self, now_ms: u32, params: &Params, state_manager: &mut StateManager, )
Sourcepub fn new_command(&mut self) -> bool
pub fn new_command(&mut self) -> bool
Returns true if a new command has been processed
Sourcepub fn stick(&self, channel: Stick) -> f32
pub fn stick(&self, channel: Stick) -> f32
Gets the processed stick value (-1.0 to 1.0, or 0.0 to 1.0 for F)
Sourcepub fn switch_on(&self, channel: Switch) -> bool
pub fn switch_on(&self, channel: Switch) -> bool
Gets the processed switch value (true or false)
Sourcepub fn switch_mapped(&self, channel: Switch) -> bool
pub fn switch_mapped(&self, channel: Switch) -> bool
Checks if a switch is mapped to a channel
Sourcepub fn get_rc_struct(&self) -> &RcStruct
pub fn get_rc_struct(&self) -> &RcStruct
Gets a reference to the raw, unprocessed RC data
Sourcepub fn read_raw_chan(&self, chan_idx: usize) -> f32
pub fn read_raw_chan(&self, chan_idx: usize) -> f32
Reads a raw, normalized (0.0 to 1.0) channel value
Auto Trait Implementations§
impl Freeze for Rc
impl RefUnwindSafe for Rc
impl Send for Rc
impl Sync for Rc
impl Unpin for Rc
impl UnsafeUnpin for Rc
impl UnwindSafe for Rc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.