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: WheelModeThe persisted wheel mode, re-applied to device RAM on reconnect.
auto_disengage: u8SmartShift auto-disengage threshold (0x08–0xFE, in 0.25 turn/s
steps), or 0xFF for a permanently engaged ratchet. A persisted value
below SMARTSHIFT_MIN_AUTO_DISENGAGE is healed to the default on load.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
impl Eq for SmartShift
Source§impl PartialEq for SmartShift
impl PartialEq for SmartShift
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
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
key and return true if they are equal.