[][src]Struct async_msp_lib::INavMsp

pub struct INavMsp { /* fields omitted */ }

Implementations

impl INavMsp[src]

pub fn new() -> INavMsp[src]

pub fn start(&self, serial: Box<dyn SerialPort>)[src]

pub async fn open_flash_data<'_>(&'_ self) -> FlashDataFile[src]

altought slower then read_flash_data, its a safe data, the reads are happening serialy

pub fn parse_chunk(payload: Vec<u8>) -> MspDataFlashReplyWithData[src]

pub async fn read_flash_data<'_>(
    &'_ self,
    chunk_size: usize,
    callback: fn(chunk: usize, total: usize)
) -> Result<Vec<u8>>
[src]

coccurent unordered data flash reading, this method assumes data is organazised into equal(except last one) chunks of data

pub async fn flash_summary<'_, '_>(
    &'_ self
) -> Result<MspDataFlashSummaryReply, &'_ str>
[src]

pub async fn set_mode_range<'_, '_>(
    &'_ self,
    index: u8,
    range: MspModeRange
) -> Result<(), &'_ str>
[src]

aux 2 44 6 1300 1400 TOOD: why the cli box id doesn't match what defined in the fc_msp_box.c because the cli command is working by the mode index in fc_msp_box.c, and not the mode id configurator ui will actually do the following conversion for box_modes start_step - ((value - 900) / 25), end_step - ((value - 900) / 25),

steps are 25 apart a value of 0 corresponds to a channel value of 900 or less a value of 48 corresponds to a channel value of 2100 or more inav.set_mode_range(inav_msp_lib::ModeRange { index: 2, box_id: 53, aux_channel_index: 0, start_step: 47, end_step: 48, }).await; will ack with the same command inav.get_mode_ranges().await

pub async fn get_mode_ranges<'_, '_>(
    &'_ self
) -> Result<Vec<MspModeRange>, &'_ str>
[src]

pub async fn set_motor_mixer<'_, '_>(
    &'_ self,
    index: u8,
    mmix: MspMotorMixer
) -> Result<(), &'_ str>
[src]

inav.set_motor_mixer(inav_msp_lib::MotorMixer { index: 0, throttle: 1000, roll: 3000, pitch: 1000, yaw: 1000, }).await; println!("cli {:?}", inav.get_motor_mixers().await);

pub async fn get_motor_mixers<'_, '_>(
    &'_ self
) -> Result<Vec<MspMotorMixer>, &'_ str>
[src]

pub async fn set_osd_config_item<'_, '_>(
    &'_ self,
    id: u8,
    item: MspOsdItemPosition
) -> Result<(), &'_ str>
[src]

inav.set_osd_config_item(116, multiwii_serial_protocol::structs::MspOsdItemPosition { col: 11u8, row: 22u8 }).await; println!("osd {:?}", inav.get_osd_settings().await);

pub async fn set_osd_config<'_, '_>(
    &'_ self,
    config: MspOsdConfig
) -> Result<(), &'_ str>
[src]

pub async fn get_osd_settings<'_, '_>(
    &'_ self
) -> Result<MspOsdSettings, &'_ str>
[src]

pub async fn set_osd_layout_item<'_, '_>(
    &'_ self,
    id: u8,
    item: MspSetOsdLayout
) -> Result<(), &'_ str>
[src]

pub async fn get_osd_layout_count<'_, '_>(
    &'_ self
) -> Result<MspOsdLayouts, &'_ str>
[src]

pub async fn get_osd_layout_items<'_, '_>(
    &'_ self,
    layout_index: u8
) -> Result<Vec<MspOsdItemPosition>, &'_ str>
[src]

pub async fn get_osd_layouts<'_, '_>(
    &'_ self
) -> Result<Vec<Vec<MspOsdItemPosition>>, &'_ str>
[src]

pub async fn set_serial_settings<'_, '_>(
    &'_ self,
    serials: Vec<MspSerialSetting>
) -> Result<(), &'_ str>
[src]

let shitty_serials = vec![multiwii_serial_protocol::structs::MspSerialSetting { index: 6, function_mask: 0, msp_baudrate_index: 0, gps_baudrate_index: 0, telemetry_baudrate_index: 0, peripheral_baudrate_index: 0 }]; inav.set_serial_settings(shitty_serials).await; println!("serial {:?}", inav.get_serial_settings().await);

pub async fn get_serial_settings<'_, '_>(
    &'_ self
) -> Result<Vec<MspSerialSetting>, &'_ str>
[src]

pub async fn set_features<'_, '_>(
    &'_ self,
    feat: MspFeatures
) -> Result<(), &'_ str>
[src]

let shitty_features = multiwii_serial_protocol::structs::MspFeatures { features: [ true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, ] }; inav.set_features(shitty_features).await; println!("features {:?}", inav.get_features().await);

pub async fn get_features<'_, '_>(&'_ self) -> Result<MspFeatures, &'_ str>[src]

pub async fn set_servo_mix_rule<'_, '_>(
    &'_ self,
    index: u8,
    servo_rule: MspServoMixRule
) -> Result<(), &'_ str>
[src]

pub async fn get_servo_mix_rules<'_, '_>(
    &'_ self
) -> Result<Vec<MspServoMixRule>, &'_ str>
[src]

println!("servo mixers {:?}", inav.get_servo_mix_rules().await);

pub async fn set_servo_mixer<'_, '_>(
    &'_ self,
    index: u8,
    servo_rule: MspServoMixer
) -> Result<(), &'_ str>
[src]

pub async fn get_servo_mixer<'_, '_>(
    &'_ self
) -> Result<Vec<MspServoMixer>, &'_ str>
[src]

pub async fn set_servo_config<'_, '_>(
    &'_ self,
    index: u8,
    servo_config: MspServoConfig
) -> Result<(), &'_ str>
[src]

pub async fn get_servo_configs<'_, '_>(
    &'_ self
) -> Result<Vec<MspServoConfig>, &'_ str>
[src]

println!("servo mixers {:?}", inav.get_servo_mix_rules().await);

pub async fn set_rx_map<'_, '_>(
    &'_ self,
    rx_map: MspRxMap
) -> Result<(), &'_ str>
[src]

inav.set_rx_map_rules(multiwii_serial_protocol::structs::MspRxMap { map: [0,0,0,0]}).await; println!("features {:?}", inav.get_rx_map_rules().await);

pub async fn get_rx_map<'_, '_>(&'_ self) -> Result<MspRxMap, &'_ str>[src]

pub fn str_from_u8_nul_utf8(utf8_src: &[u8]) -> Result<&str, Utf8Error>[src]

pub async fn set_setting_by_id<'a, '_, '_, '_>(
    &'_ self,
    id: &'a u16,
    value: &'_ [u8]
) -> Result<&'a u16, &'_ str>
[src]

pub async fn set_setting_by_name<'_, '_, '_, '_>(
    &'_ self,
    name: &'_ str,
    value: &'_ [u8]
) -> Result<(), &'_ str>
[src]

pub async fn set_setting<'_, '_, '_, '_>(
    &'_ self,
    id: &'_ [u8],
    value: &'_ [u8]
) -> Result<(), &'_ str>
[src]

pub async fn get_setting_info_by_name<'_, '_, '_>(
    &'_ self,
    name: &'_ str
) -> Result<SettingInfo, &'_ str>
[src]

pub async fn get_setting_info_by_id<'_, '_, '_>(
    &'_ self,
    id: &'_ u16
) -> Result<SettingInfo, &'_ str>
[src]

pub async fn get_setting_info<'_, '_>(
    &'_ self,
    id: Vec<u8>
) -> Result<SettingInfo, &'_ str>
[src]

pub async fn get_pg_settings<'_, '_>(
    &'_ self
) -> Result<Vec<MspSettingGroup>, &'_ str>
[src]

pub async fn write_char<'_, '_>(
    &'_ self,
    addr: usize,
    char_pixels: [u8; 54]
) -> Result<usize, &'_ str>
[src]

pub async fn save_to_eeprom<'_, '_>(&'_ self) -> Result<(), &'_ str>[src]

pub async fn reboot<'_, '_>(&'_ self) -> Result<(), &'_ str>[src]

Auto Trait Implementations

impl !RefUnwindSafe for INavMsp

impl Send for INavMsp

impl Sync for INavMsp

impl Unpin for INavMsp

impl !UnwindSafe for INavMsp

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.