pub struct SmartShift {
pub mode: WheelMode,
pub auto_disengage: u8,
pub tunable_torque: u8,
}Expand description
Per-device SmartShift wheel configuration, persisted so the agent can re-apply it when the device reconnects: the values are written to device RAM and do not survive a power cycle (#189), despite earlier assumptions that the device kept them in NVM.
Config-file only — never crosses the IPC (the agent reads it from
config.toml on reload), so it is free to evolve without a
PROTOCOL_VERSION bump.
Fields§
§mode: WheelMode§auto_disengage: u8SmartShift auto-disengage threshold (0x01–0xFE, in 0.25 turn/s
steps), or 0xFF for a permanently engaged ratchet.
tunable_torque: u8Tunable-torque force percentage (1–100), 0 when the device
doesn’t support tunable torque.
Trait Implementations§
Source§impl Clone for SmartShift
impl Clone for SmartShift
Source§fn clone(&self) -> SmartShift
fn clone(&self) -> SmartShift
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 SmartShift
Source§impl Debug for SmartShift
impl Debug for SmartShift
Source§impl<'de> Deserialize<'de> for SmartShift
impl<'de> Deserialize<'de> for SmartShift
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SmartShift
Source§impl PartialEq for SmartShift
impl PartialEq for SmartShift
Source§fn eq(&self, other: &SmartShift) -> bool
fn eq(&self, other: &SmartShift) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SmartShift
impl Serialize for SmartShift
impl StructuralPartialEq for SmartShift
Auto Trait Implementations§
impl Freeze for SmartShift
impl RefUnwindSafe for SmartShift
impl Send for SmartShift
impl Sync for SmartShift
impl Unpin for SmartShift
impl UnsafeUnpin for SmartShift
impl UnwindSafe for SmartShift
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.