Skip to main content

airsim_client/types/
drive_train.rs

1use msgpack_rpc::Value;
2
3#[derive(Debug, Clone, Copy)]
4pub enum DrivetrainType {
5    MaxDegreeOfFreedom,
6    ForwardOnly,
7}
8
9impl DrivetrainType {
10    pub(crate) fn as_msgpack(&self) -> Value {
11        let val = match self {
12            DrivetrainType::MaxDegreeOfFreedom => 0_i64,
13            DrivetrainType::ForwardOnly => 1_i64,
14        };
15
16        Value::Integer(val.into())
17    }
18}