Skip to content

Latest commit

 

History

History
138 lines (101 loc) · 7.71 KB

iquart_flight_controller_interface.rst

File metadata and controls

138 lines (101 loc) · 7.71 KB

IQUART Flight Controller Interface (IFCI)

This client is used to simplify communication between flight controllers and multiple modules connected to the IQUART bus.

Arduino

To use the IQUART Flight Controller Interface in Arduino, ensure iquart_flight_controller_interface_client.hpp is included. This allows the creation of a IQUartFlightControllerInterfaceClient object. See the Message Table below for available messages. All message objects use the Short Name with a trailing underscore. All messages use the standard Get/Set/Save functions.

A minimal working example for the IQUartFlightControllerInterfaceClient is:

#include <iq_module_communication.hpp>

IqSerial ser(Serial2);
IQUartFlightControllerInterfaceClient iquartFlightControllerInterface(0);

void setup() {
    ser.begin();
    // Initialize Serial (for displaying information on the terminal)
    Serial.begin(115200);
}

void loop() {
    int pulsingVoltageMode = 0;
    if(ser.get(iquartFlightControllerInterface.telemetry_, pulsingVoltageMode))
    Serial.println(pulsingVoltageMode);
}

C++

To use the IQUART Flight Controller Interface client in C++, include iquart_flight_controller_interface_client.hpp. This allows the creation of an IQUartFlightControllerInterface object. See the Message Table below for available messages. All message objects use the Short Name with a trailing underscore. All messages use the standard Get/Set/Save functions.

Simply create an IFCITelemetryData object to store the response from the telemetry endpoint. A minimal working example for the IQUartFlightControllerInterfaceClient using the telemetry endpoint is:

Matlab

To use the IQUART Flight Controller Interface client in Matlab, all Vertiq communication code must be included in your path. This allows the creation of a IQUartFlightControllerInterfaceClient object. See the Message Table below for available messages. All message strings use the Short Names. All messages use the standard Get/Set/Save functions.

A minimal working example for the IQUartFlightControllerInterfaceClient is:

% Make a communication interface object
com = MessageInterface('COM18', 115200);
% Make a IQUART Flight Controller Interface object with obj_id 0
% IQUART Flight Controller Interface objects are always obj_id 0
IquartFlightControllerInterface = IQUartFlightControllerInterfaceClient('com', com);
% Use the IQUART Flight Controller Interface object
throttleCvi= IquartFlightControllerInterface.get('throttle_cvi');

Python

To use the IQUART Flight Controller Interface Client in Python, import iqmotion and create a module that has the Arming Handler Client within its firmware. See the table below for available messages. All message strings use the Short Names. All messages use the standard Get/Set/Save functions.

A minimal working example for the IQUART Flight Controller Interface Client is:

import iqmotion as iq

com = iq.SerialCommunicator("/dev/ttyUSB0")
|variable_name| = iq.|module_name|(com, 0, firmware="pulsing")

telemetry = |variable_name|.get("iquart_flight_controller_interface", "telemetry") 
print(f"Pulsing voltage mode: {telemetry}")

Message Table

Type ID 88 | IQUART Flight Controller Interface
IQUART Flight Controller Interface
Sub ID Short Name Access Data Type Unit Note
1 telemetry get See IFCITelemetryData struct<ifcitelemetrydata_note> 16 Byte Array Returns 16 bytes of telemetry information. See the IFCITelemetryData struct<ifcitelemetrydata_note> notes.
2 throttle_cvi get, set, save uint8 Index [0, 255] The control value index for the throttle.
3 x_cvi get, set, save uint8 Index [0, 255] The control value index value for the x rectangular coordinate.
4 y_cvi get, set, save uint8 Index [0, 255] The control value index value for the y rectangular coordinate.