pub struct SerialPort {
pub path: String,
pub usb: Option<UsbId>,
pub fc_score: u8,
}Expand description
A serial port the agent may attach a flight controller (or other UART peripheral) to.
Fields§
§path: StringThe device path, e.g. /dev/ttyACM0.
usb: Option<UsbId>The backing USB id when the port is a USB-serial bridge (CDC-ACM / FTDI).
fc_score: u8A heuristic 0-100 score that the port is a flight controller (a higher score for known FC USB ids / ACM nodes); the caller picks the best.
Trait Implementations§
Source§impl Clone for SerialPort
impl Clone for SerialPort
Source§impl Debug for SerialPort
impl Debug for SerialPort
Source§impl<'de> Deserialize<'de> for SerialPort
impl<'de> Deserialize<'de> for SerialPort
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 SerialPort
Source§impl PartialEq for SerialPort
impl PartialEq for SerialPort
Source§impl Serialize for SerialPort
impl Serialize for SerialPort
impl StructuralPartialEq for SerialPort
Auto Trait Implementations§
impl Freeze for SerialPort
impl RefUnwindSafe for SerialPort
impl Send for SerialPort
impl Sync for SerialPort
impl Unpin for SerialPort
impl UnsafeUnpin for SerialPort
impl UnwindSafe for SerialPort
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.