Skip to main content

pamoja_mavlink_message_get_float

Function pamoja_mavlink_message_get_float 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_mavlink_message_get_float( message: *const PamojaMavlinkMessage, field: *const c_char, index: usize, out_value: *mut f64, ) -> PamojaStatus
Expand description

Reads a floating-point field.

§Arguments

  • message - the message to read.
  • field - the field name.
  • index - the element to read, or 0 for a scalar field.
  • out_value - set to the value on success, widened from float where needed.

§Returns

PamojaStatus::Ok on success.

§Errors

Returns PamojaStatus::InvalidArgument if a pointer is null, the message has no such field, the element is past the end of an array, or the field is an integer.

§Safety

message must be a live message handle, field a null-terminated C string, and out_value must point at writable storage for one double.