mirror of https://github.com/ArduPilot/ardupilot
SITL: only de-select data types in xplane once
don't fight the user
This commit is contained in:
parent
c2521dd650
commit
35d6dc141a
|
@ -79,10 +79,14 @@ void XPlane::select_data(uint64_t usel_mask, uint64_t sel_mask)
|
|||
uint32_t data[8] {};
|
||||
} usel;
|
||||
count = 0;
|
||||
|
||||
// only de-select an output once, so we don't fight the user
|
||||
usel_mask &= ~unselected_mask;
|
||||
unselected_mask |= usel_mask;
|
||||
|
||||
for (uint8_t i=0; i<64 && count<8; i++) {
|
||||
if ((((uint64_t)1)<<i) & usel_mask) {
|
||||
usel.data[count++] = i;
|
||||
printf("i=%u\n", (unsigned)i);
|
||||
}
|
||||
}
|
||||
if (count != 0) {
|
||||
|
|
|
@ -68,6 +68,8 @@ private:
|
|||
|
||||
// are we controlling a heli?
|
||||
bool heli_frame;
|
||||
|
||||
uint64_t unselected_mask;
|
||||
|
||||
// throttle joystick input is very weird. See comments in the main code
|
||||
const float throttle_magic = 0.000123f;
|
||||
|
|
Loading…
Reference in New Issue