pub struct SmartShift {
pub mode: WheelMode,
pub auto_disengage: SmartShiftAutoDisengage,
pub tunable_torque: Option<TunableTorque>,
}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: SmartShiftAutoDisengageSmartShift 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 rejected on load.
tunable_torque: Option<TunableTorque>Firmware tunable-torque level (1–255), 0 when the device does not
expose tunable torque. HID++ defines the full non-zero byte range.
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 From<SmartShift> for SmartShiftStatus
impl From<SmartShift> for SmartShiftStatus
Source§fn from(config: SmartShift) -> Self
fn from(config: SmartShift) -> Self
Source§impl From<SmartShiftStatus> for SmartShift
impl From<SmartShiftStatus> for SmartShift
Source§fn from(status: SmartShiftStatus) -> Self
fn from(status: SmartShiftStatus) -> Self
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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.