mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-02 14:13:42 -04:00
29d8586ea4
This allows more channels to be passed to RCInput_UDP protocol while also allowing less than 8 channels - this is similar to the approach used by SITL in which the packet size is used to figure out the number of channels.
20 lines
497 B
C
20 lines
497 B
C
#pragma once
|
|
|
|
#define RCINPUT_UDP_NUM_CHANNELS 8
|
|
#define RCINPUT_UDP_NUM_CHANNELS_V3 16
|
|
|
|
struct __attribute__((packed)) rc_udp_packet {
|
|
uint32_t version;
|
|
uint64_t timestamp_us;
|
|
uint16_t sequence;
|
|
uint16_t pwms[RCINPUT_UDP_NUM_CHANNELS];
|
|
};
|
|
|
|
struct __attribute__((packed)) rc_udp_packet_v3 {
|
|
uint32_t version;
|
|
uint64_t timestamp_us;
|
|
uint16_t sequence;
|
|
/* Up-to 16 channels, but client can transmit less channels */
|
|
uint16_t pwms[RCINPUT_UDP_NUM_CHANNELS_V3];
|
|
};
|