dji_log_parser/frame/
gimbal.rs

1use serde::Serialize;
2#[cfg(target_arch = "wasm32")]
3use tsify_next::Tsify;
4
5use crate::record::gimbal::GimbalMode;
6
7#[derive(Serialize, Debug, Default, Clone)]
8#[serde(rename_all = "camelCase")]
9#[cfg_attr(target_arch = "wasm32", derive(Tsify))]
10pub struct FrameGimbal {
11    /// Current gimbal mode
12    #[cfg_attr(target_arch = "wasm32", tsify(optional))]
13    pub mode: Option<GimbalMode>,
14    /// Gimbal pitch angle in degrees
15    pub pitch: f32,
16    /// Gimbal roll angle in degrees
17    pub roll: f32,
18    /// Gimbal yaw angle in degrees
19    pub yaw: f32,
20    /// Indicates if gimbal pitch is at its limit
21    pub is_pitch_at_limit: bool,
22    /// Indicates if gimbal roll is at its limit
23    pub is_roll_at_limit: bool,
24    /// Indicates if gimbal yaw is at its limit
25    pub is_yaw_at_limit: bool,
26    /// Indicates if the gimbal is stuck
27    pub is_stuck: bool,
28}