Radio Control Transmitter
Read input_rc uORB topic to obtain data from Radio Control Transmitter
Add-On Required: This feature requires the UAV Toolbox Support Package for PX4 Autopilots add-on.
Libraries:
UAV Toolbox Support Package for PX4 Autopilots /
PX4 Sensor Blocks
Description
The Radio Control Transmitter block reads the input_rc uORB topic to obtain the signals sent from a Radio Control Transmitter at the specified channels.
During Normal mode simulation, the block outputs zeroes.
During Connected I/O simulation, this block reads data from the peripherals of the hardware.
Ports
Output
Pulse width values obtained from the selected channels of the Radio Control Transmitter. Connect these output values to the flight control logic in the Simulink model.
Data Types: uint16
The count of channels that are actually being seen based on the communication with the Radio Control Transmitter
Dependencies
This output appears only if you have selected the Number of channels actually being seen parameter.
Data Types: uint32
RSSI (Receive Signal Strength Indicator ) value obtained from the Radio Control Transmitter.
The value is negative for an undefined signal, 0 for no signal, and positive for full reception.
Dependencies
This output appears only if you have selected the Receive Signal Strength Indicator (RSSI) parameter.
Data Types: int32
Identify the input source of RC communication. The value ranges from
0
to 13
(these correspond to the same values
as mentioned in the input_rc.msg
file in
Firmare/msg
directory).
Dependencies
This output appears only if you have selected the Radio control input source parameter.
Data Types: uint8
Timestamp of the last valid reception from the Radio Control Transmitter.
Dependencies
This output appears only if you have selected the Last valid reception time parameter.
Data Types: uint64
Current timestamp of the value received from the Radio Control Transmitter.
Dependencies
This output appears only if you have selected the Timestamp parameter.
Data Types: double
The Status output indicates if the data was received during a previous time step
or not. A value of 0
indicates that the data at the
Ch
output is the latest and the communication with the Radio
Control Transmitter is valid.
A value between 1 and 7 indicates the following:
No value was read by the uORB topic during the current time step
Communication loss with Radio Control Transmitter
Radio Control Transmitter went to failsafe mode
This output can be used to trigger subsystems for processing the new data received from the RC Transmitter.
Data Types: uint8
Parameters
Main tab
Select the channels from which you want to receive values, as read from the Radio
Control Transmitter. The Ch
outputs of the block appear based on the
selection in this parameter list.
Select this option to obtain the count of channels that are actually being seen based on the communication with the Radio Control Transmitter.
Select this option to obtain the RSSI value as received from the Radio Control Transmitter
Select this option to identify the input source of RC communication.
Select this option to obtain the timestamp of the last valid reception from the Radio Control Transmitter.
Select this option to obtain the current timestamp of the channel value from the Radio Control Transmitter.
Enter the time interval at which the block reads values from the RC Transmitter.
When you set this parameter to -1
, Simulink® determines the best sample time for the block based on the block context
within the model.
Advanced tab
When you select this option, the read operation runs in Blocking Mode. The read operation is blocked while waiting for the requested data to be available.
A task overrun occurs if the target hardware is still waiting for the data to be available when the next read operation is scheduled to begin.
To fix overruns, increase the time step by using the Sample time parameter.
When you clear this option, the read operation runs in Non-Blocking Mode. In this mode, the block does not wait for the requested data to be available.
Specify the amount of time that the block waits for the data during each time step, if the Wait until data received parameter is selected. If timeout occurs, the read operation is aborted.
Dependencies
This parameter appears only when you select the Wait until data received parameter.
Version History
Introduced in R2018b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)