Skip to main content
RKTK API Docs RKTK Home Repo

SwitchProfile

Trait SwitchProfile 

Source
pub trait SwitchProfile {
    // Required methods
    fn max_travel(&self) -> u16;
    fn normalized_to_distance(&self, normalized: u16) -> u16;
}

Required Methods§

Source

fn max_travel(&self) -> u16

Max travel distance of the switch in 0.01mm (e.g. 400 for 4.0mm)

Source

fn normalized_to_distance(&self, normalized: u16) -> u16

Maps normalized value (0-65535) to distance (0 to max_travel)

Implementors§