mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
SITL: support up to 12 actuators with RealFlight8
the new beta release supports up to 12 channels
This commit is contained in:
parent
2e98de3292
commit
e3cd081064
@ -281,8 +281,9 @@ void FlightAxis::exchange_data(const struct sitl_input &input)
|
||||
controller_started = true;
|
||||
}
|
||||
|
||||
float scaled_servos[8];
|
||||
for (uint8_t i=0; i<8; i++) {
|
||||
// maximum number of servos to send is 12 with new FlightAxis
|
||||
float scaled_servos[12];
|
||||
for (uint8_t i=0; i<ARRAY_SIZE(scaled_servos); i++) {
|
||||
scaled_servos[i] = (input.servos[i] - 1000) / 1000.0f;
|
||||
}
|
||||
|
||||
@ -312,7 +313,7 @@ void FlightAxis::exchange_data(const struct sitl_input &input)
|
||||
<soap:Body>
|
||||
<ExchangeData>
|
||||
<pControlInputs>
|
||||
<m-selectedChannels>255</m-selectedChannels>
|
||||
<m-selectedChannels>4095</m-selectedChannels>
|
||||
<m-channelValues-0to1>
|
||||
<item>%.4f</item>
|
||||
<item>%.4f</item>
|
||||
@ -322,6 +323,10 @@ void FlightAxis::exchange_data(const struct sitl_input &input)
|
||||
<item>%.4f</item>
|
||||
<item>%.4f</item>
|
||||
<item>%.4f</item>
|
||||
<item>%.4f</item>
|
||||
<item>%.4f</item>
|
||||
<item>%.4f</item>
|
||||
<item>%.4f</item>
|
||||
</m-channelValues-0to1>
|
||||
</pControlInputs>
|
||||
</ExchangeData>
|
||||
@ -334,7 +339,11 @@ void FlightAxis::exchange_data(const struct sitl_input &input)
|
||||
scaled_servos[4],
|
||||
scaled_servos[5],
|
||||
scaled_servos[6],
|
||||
scaled_servos[7]);
|
||||
scaled_servos[7],
|
||||
scaled_servos[8],
|
||||
scaled_servos[9],
|
||||
scaled_servos[10],
|
||||
scaled_servos[11]);
|
||||
|
||||
if (reply) {
|
||||
WITH_SEMAPHORE(mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user