Skip to main content

travel_from

Function travel_from 

Source
fn travel_from(cal: &KeyCalib, raw: u16) -> Option<u8>
Expand description

Convert a raw ADC reading into a travel value.

Returns None if the position is uncalibrated, if raw is outside VALID_RAW_MIN..=VALID_RAW_MAX, or if the computation overflows.