pub struct SetTargetContext {
pub current_mode: Option<MotorMode>,
pub peak_torque_nm: Option<f32>,
pub mit_kp_kd_factor: Option<f32>,
}Expand description
set_target 时除 target 本身外需要从 Manager 缓存里取的上下文。
current_mode 必填(从 MotorEntry 的 target_mode 取);其它
字段只有相应模式才需要:
peak_torque_nm:Torquetarget 把 Nm →0x6071i16 ‰ 时用mit_kp_kd_factor:Mittarget 把 Nm/Rev →0x2003:04/05u16kp_int/kd_int时用
Fields§
§current_mode: Option<MotorMode>§peak_torque_nm: Option<f32>§mit_kp_kd_factor: Option<f32>Trait Implementations§
Source§impl Clone for SetTargetContext
impl Clone for SetTargetContext
Source§fn clone(&self) -> SetTargetContext
fn clone(&self) -> SetTargetContext
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 moreimpl Copy for SetTargetContext
Source§impl Debug for SetTargetContext
impl Debug for SetTargetContext
Source§impl Default for SetTargetContext
impl Default for SetTargetContext
Source§fn default() -> SetTargetContext
fn default() -> SetTargetContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SetTargetContext
impl RefUnwindSafe for SetTargetContext
impl Send for SetTargetContext
impl Sync for SetTargetContext
impl Unpin for SetTargetContext
impl UnsafeUnpin for SetTargetContext
impl UnwindSafe for SetTargetContext
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