dji_log_parser/frame/
battery.rs

1use serde::Serialize;
2#[cfg(target_arch = "wasm32")]
3use tsify_next::Tsify;
4
5#[derive(Serialize, Debug, Default, Clone)]
6#[serde(rename_all = "camelCase")]
7#[cfg_attr(target_arch = "wasm32", derive(Tsify))]
8pub struct FrameBattery {
9    /// Battery charge level in percentage
10    pub charge_level: u8,
11    /// Battery voltage
12    pub voltage: f32,
13    /// Battery current
14    pub current: f32,
15    /// Current battery capacity
16    pub current_capacity: u32,
17    /// Full battery capacity
18    pub full_capacity: u32,
19    /// Number of battery cells
20    pub cell_num: u8,
21    /// Indicates if cell voltage is derived from global voltage
22    pub is_cell_voltage_estimated: bool,
23    /// Cell voltages
24    pub cell_voltages: Vec<f32>,
25    /// Deviation in cell voltages
26    pub cell_voltage_deviation: f32,
27    /// Maximum deviation in cell voltages
28    pub max_cell_voltage_deviation: f32,
29    /// Battery temperature
30    pub temperature: f32,
31    /// Minimum battery temperature
32    pub min_temperature: f32,
33    /// Maximum battery temperature
34    pub max_temperature: f32,
35}