airsim-client 0.3.2

A Rust client library for Airsim.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use msgpack_rpc::Value;

#[derive(Debug, Clone, Copy)]
pub enum DrivetrainType {
    MaxDegreeOfFreedom,
    ForwardOnly,
}

impl DrivetrainType {
    pub(crate) fn as_msgpack(&self) -> Value {
        let val = match self {
            DrivetrainType::MaxDegreeOfFreedom => 0_i64,
            DrivetrainType::ForwardOnly => 1_i64,
        };

        Value::Integer(val.into())
    }
}