#[non_exhaustive]pub struct VFOCCommand {
pub theta: f32,
pub voltage: f32,
pub theta_rate: Option<f32>,
}Expand description
Voltage-mode FOC command.
See PositionCommand for an example of building and serializing commands.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.theta: f32Electrical angle in radians
voltage: f32Voltage to apply
theta_rate: Option<f32>Electrical angle rate in radians/second
Implementations§
Source§impl VFOCCommand
impl VFOCCommand
Source§impl VFOCCommand
impl VFOCCommand
Sourcepub fn serialize(&self, frame: &mut CanFdFrame, format: &VFOCFormat)
pub fn serialize(&self, frame: &mut CanFdFrame, format: &VFOCFormat)
Serializes this command to a CAN frame.
Trait Implementations§
Source§impl Clone for VFOCCommand
impl Clone for VFOCCommand
Source§fn clone(&self) -> VFOCCommand
fn clone(&self) -> VFOCCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VFOCCommand
impl Debug for VFOCCommand
Auto Trait Implementations§
impl Freeze for VFOCCommand
impl RefUnwindSafe for VFOCCommand
impl Send for VFOCCommand
impl Sync for VFOCCommand
impl Unpin for VFOCCommand
impl UnsafeUnpin for VFOCCommand
impl UnwindSafe for VFOCCommand
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