typedefstruct__mavlink_rc_channels_raw_t { uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) uint16_t chan1_raw; ///< RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused. uint16_t chan2_raw; ///< RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused. uint16_t chan3_raw; ///< RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused. uint16_t chan4_raw; ///< RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused. uint16_t chan5_raw; ///< RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused. uint16_t chan6_raw; ///< RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused. uint16_t chan7_raw; ///< RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused. uint16_t chan8_raw; ///< RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused. uint8_t port; ///< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. } mavlink_rc_channels_raw_t;
etc/config.txt 内可以定制机架类型。如果要定制 a quadcopter with “+” configuration with ESCs connected to PX4IO and custom PWM range (1100…1900),大概写成这样:
1 2 3 4 5 6 7 8 9
# Generic Quadcopter + set VEHICLE_TYPE mc set MIXER FMU_quad_+ # PX4IO PWM output will be used bydefault set PWM_OUTPUTS 1234 # Change parameters for the first4 outputs set PWM_RATE 400 # Set PWM rate to400 Hz for better performance set PWM_DISARMED 900 # Motors should stopat this PWM value set PWM_MIN 1100 # Motors should spin at low, idle speed at this PWM value set PWM_MAX 1900 # Motors should spin atmax speed at this PWM value