Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-Vehicle: Joystick input gets stuck on a single vehicle #10544

Closed
goasChris opened this issue Jan 16, 2023 · 22 comments
Closed

Multi-Vehicle: Joystick input gets stuck on a single vehicle #10544

goasChris opened this issue Jan 16, 2023 · 22 comments

Comments

@goasChris
Copy link

Expected Behavior

When having multiple devices/vehicles connected to QGC I would expect that you can easily and in a stable manner switch between them when sending joystick/controller inputs.

Current Behavior

When having two vehicles connected to QGC, it will get stuck sending joystick inputs to a single vehicle after switching from one vehicle to another a few times (1-3). You will need to restart QGC, or recalibrate the controller in order for be able to switch again, but it will get stuck after switching.

Steps to Reproduce:

  1. Have two vehicles set up. We used the docker version of ardusub companion. Set them up to point at QGC IP with port udp/14660. We used vehicle ID 10 and 13 for ours.
  2. In QGC, set up a "comm link" using UDP/14660, and your local ipv4 adresse.
  3. Confirm in the log that both have connected, and that you get the multi vehicle UI up, so that you can switch between them. Confirm you can arm/disarm both, and that both are delivering mavdata.
  4. Have a USB controller set up, calibrated and configured.
  5. Move the stick forward, so that you'll send thruster input to the currently selected vehicle (currently 10). Physically confirm the thrusters are engaging. Or you can send a simple arm/disarm command via the controller.
  6. Let go of the stick/button, wait a few sec, and then switch to the other vehicle (now 13) in the drop down menu at the top. Repeat step 5.
  7. Repeat step 6 (switch vehicle, up to 2-3 times), and observe how the thruster will not engage on the selected vehicle, nor will arm/disarm via controller input. Instead it is sending the packets to the wrong vehicle for thruster, arm/dismarm etc.
  8. Try switching back and forth between the vehicle, and observe it being completely stuck on a single vehicle.

System Information

  • Operating System: Win 10 22H2
  • QGC Version: 4.2.3
  • QGC build: Stable, from Github
  • Flight Controller: Blue Robotics Navigator on pi4
  • Autopilot (with version): unsure, rover type

Detailed Description

When controlling multiple robots (id Vehicle 10 and 13). We get info from both.
Thru the QGC UI we can arm and disarm both. Switching is fine, we get up to date information.

The issue is with USB controller input getting sent to the incorrect mavlink/robot at times.
Usually fine initially, but after switching between boths vehicles 1-3 times, it will get stuck sending USB controller/thrusts to a single vehicle.

Recalibrating the joystick seems to reset/resolve it temporarily. If we switch back and forth between them a few more times, it gets stuck sending to a single one again.
It does not seem to be more often on one or the other more often, it feels random.
Restarting QGC will resolve it (you can switch and control either), until it gets stuck again.

It seems to me like network communication is fine. We can always receive up to date data, and can arm/disarm in the QGC UI (not controller).

Log Files and Screenshots

logQGC-ControllerIssue.txt

@vorobotics
Copy link

I can confirm this happens for me as well. I find that if I toggle the "Enable" checkbox for the USB controller after switching vehicles that control will switch to the newly selected vehicle, but this is far from ideal. The expected behavior is that joystick input should switch to the currently selected vehicle.

@zdanek
Copy link
Collaborator

zdanek commented Mar 21, 2023

I will check this tomorrow as we plan to fly two drones with one joystick and QGC. If I will confirm this at my side I can fix it as I need this feature to work smoothly in my project.

@vorobotics
Copy link

vorobotics commented Mar 21, 2023

I noticed that if I make these changes, switching active vehicle works and moves the joystick control to the new vehicle.

Basically when user changes the active vehicle, I set joystick disabled for the old vehicle (in setActiveVehicle()), then set it enabled for the new vehicle (in setActiveVehiclePhase2()).

It's a hack/workaround, as I am not intimately familiar with QGC code base QT or best practices; but it seems to work. I think it is really a matter of passing the right signals around when the user switches the active vehicle.

diff --git a/src/Vehicle/MultiVehicleManager.cc b/src/Vehicle/MultiVehicleManager.cc
index 1334d115a..548e65f83 100644
--- a/src/Vehicle/MultiVehicleManager.cc
+++ b/src/Vehicle/MultiVehicleManager.cc
@@ -271,6 +271,7 @@ void MultiVehicleManager::setActiveVehicle(Vehicle* vehicle)
             // any existing ui from the currently active vehicle.
             _activeVehicleAvailable = false;
             _parameterReadyVehicleAvailable = false;
+            _activeVehicle->setJoystickEnabled(false);
             emit activeVehicleAvailableChanged(false);
             emit parameterReadyVehicleAvailableChanged(false);
         }
@@ -301,6 +302,7 @@ void MultiVehicleManager::_setActiveVehiclePhase2(void)
     if (_activeVehicle) {
         _activeVehicleAvailable = true;
         emit activeVehicleAvailableChanged(true);
+        _activeVehicle->setJoystickEnabled(true);
 
         if (_activeVehicle->parameterManager()->parametersReady()) {
             _parameterReadyVehicleAvailable = true;

@rizvanovic
Copy link

We experienced this issue too whilst flight testing. Our operator could not change between the different vehicles without doing the manual workaround noted in this issue thread. We also saw issues with changing modes. If the operator had vehicle 2 selected and tried changing modes it would change modes on vehicle 1.

@vorobotics
Copy link

@rizvanovic Have you tried the patch I suggested above? I found that with this small change, I can reliably switch between vehicles and the joystick and button control always moves to the new vehicle.

@rizvanovic
Copy link

@vorobotics I have not. Hoping for a fix to be merged in the future. Is there an open PR for this?

@vorobotics
Copy link

Not yet, I'll make one.

booo pushed a commit that referenced this issue Apr 5, 2023
…ehicle is changed

When there are multiple vehicles, and you select a vehicle, the joystick should switch over to the newly active vehicle, and only the active vehicle (so that joystick inputs are not sent to a vehicle you do not intend to control). 

To resolve this, we connect Vehicle to the activeVehicleAvailableChanged and activeVehicleChanged signals produced by the MultiVehicleManager. ALL vehicles disable joystick when activeVehicleAvailableChanged(false), because this signals when there is no longer an active vehicle available. When activeVehicleChanged is signalled, ONLY the currently active vehicle enables joystick. 

See issue #10544.
@vorobotics
Copy link

@rizvanovic Please check, a fix has been merged into master in commit 434e76a. This should ensure that the joystick inputs control only the active vehicle when the active vehicle is changed using the drop down menu.

@zdanek
Copy link
Collaborator

zdanek commented Jul 12, 2023

It did not help in my situation. Trying to figure out why.

When QGC is connected to more than on drone through single connection (for example UDP that is forwarded to multiple drones) switching Vehicles makes joystick work with first Vehicle only (when it's active) and not with others.
This is a serious problem. Examples of connections:

  • single RFD (radio) link, connected through UDP
  • SITL sim, that can be run with:
./sim_vehicle.py -v ArduCopter -D -j 8 --console --map --osd --tonealarm -f quad -n 3 -I 1

@vorobotics
Copy link

vorobotics commented Jul 12, 2023

What version of QGC are you using? I have tested this on the nightly build master:ce21b6843 2023-07-11 9:56:23 +0000 and I am able to switch between vehicles and joystick control moves to the new vehicle.

Here is a video:
https://drive.google.com/file/d/1UmYh2EBicGyBSRyDh-_z1vP1MW_2en-Q/view?usp=sharing

Note that when you are running multiple vehicles through the same link as you have described, you need to have different SYSID_THISMAV for each vehicle so you can select between them using the dropdown box as I show in the video.

Also, I have used this in the field with multiple real drones this way. I have connected a SteamDeck to multiple drones using QGC and I am able to switch between the drones easily using the dropdown menu, and take joystick control the selected vehicle.

@zdanek
Copy link
Collaborator

zdanek commented Jul 12, 2023

@vorobotics Thank you so much for the video. This helps me a lot.
I've used exactly that commit, head of master. Built today.
I know about vehicle's ID.

Have you used SITL of ardupilot? Which version / commit?

@vorobotics
Copy link

@zdanek ArduPilot 4.3.2

But I have also tested this on real drones running PX4 firmware.

@zdanek
Copy link
Collaborator

zdanek commented Jul 13, 2023

It's not working at my computer. I Ubuntu 22.04LTS.
Which OS you have? I'm so confused that I need to pin out the problem.
We tested it on Windows with RFD link and Windows, so my SITL on Linux seems not to be a problem.

@vorobotics
Copy link

@zdanek I have used this on Ubuntu 20.04 and 22.04 for both QGC and the SITL.

@zdanek
Copy link
Collaborator

zdanek commented Jul 13, 2023

@vorobotics thank you for your support.
Now I will dig into this.

@JMare
Copy link
Contributor

JMare commented Jul 21, 2023

@zdanek @vorobotics

I have been testing this as part of looking into #10664

I tested today with a USB Joystick, running multi vehicles, and I can confirm that:

In the case of Multiple Vehicles on Multiple Links, switching between vehicles works as intended. Control and joystick axis are transferring successfully.
In the case of Multiple Vehicles on One Link, switching between vehicles does not work as intended. In this case, when I switch to vehicle 2, I am unable to control either vehicle with the control axis, but the buttons are transferring over.

Test Setup:

  • QGroundControl Master Daily Version 4fe11c2
  • Ardupilot Master 25cec12223
  • USB Joystick calibrated, enabled, with arm button, loiter button and guided

Test 1: Setup two vehicles on two links

  • sim_vehicle.py -v ArduCopter -I 0 -w --sysid=1
  • sim_vehicle.py -v ArduCopter -I 1 -w --sysid=2
  • Start QGC and configure a UDP link on 14560 (for vehicle 2, vehicle 1 is autoconnect udp)
  • Check Joystick Enabled
  • Takeoff aircraft 1 in guided mode - verify yaw control with joystick once altitude is reached. Check you can switch between loiter and guided with buttons.
  • Leave vehicle 1 in guided, switch to vehicle 2
  • Takeoff aircraft 2 in guided mode - verify yaw control with joystick once altitude is reached. Check you can switch between loiter and guided with buttons.
  • Switch Back to vehicle 1, verify sticks and buttons again.

Test 2: Setup two vehicles on one link

  • (close all SITL and QGC Instances from last test)
  • sim_vehicle.py -v ArduCopter -w -n 2 --auto-sysid
  • Start qgroundcontrol, don't manually connect any comm links as both vehicles are now on autoconnect UDP
  • Vehicle 2 will be selected by default
  • Check Joystick Enabled
  • Takeoff aircraft 2 in guided mode - once altitude is reached, check for yaw control and buttons working - I found that I had no yaw control, but buttons worked.
  • Leave vehicle 2 in guided, switch to vehicle 1
  • Takeoff in guided. Once altitude is reached, check for yaw control and buttons working I found that I had yaw control and buttons all working
  • Leave vehicle 1 in guided, switch back to vehicle 2. Check again for yaw control and buttons working. I again found buttons working but no yaw control in vehicle 2.

This is a dangerous situation because on vehicle 2 I was able to switch to loiter, but because the joysticks were not working, it was acting as if I was giving zero throttle and immediately started descending at max rate.

@JMare
Copy link
Contributor

JMare commented Jul 24, 2023

I did a bit more testing this morning, and I think that this is actually not a bug in QGC.

First I repeated test 2 and checked the wireshark output from QGC - and everything looks good, when vehicle is changed, target system changes, and axis's appear working.

Then I had an idea and found that if you switch vehicle in mavproxy when you switch vehicle in qggroundcontrol, the functionality works.
Ie, when you switch from vehicle 1 to 2 using the dropdown in QGC, also type into the mavproxy instance attached to SITL "vehicle 2".

If you do that, everything seems to work as intended for my Test 2 case above.
So I think that there must be code in mavproxy which is doing the same thing as QGC is trying to do, stop joystick input being sent to the non-active vehicle.

@zdanek have you seen this issue in any situation where the links are not passing through a MAVProxy instance?

I am trying to setup a multi vehicle px4 simulation to compare, but I'm not very familar with PX4 so its taking me a bit to get going.

@JMare
Copy link
Contributor

JMare commented Jul 24, 2023

I can confirm that everything works in the following two scenarios:

Multi Vehicle PX4 Simulation:
Start two vehicles:
PX4_SYS_AUTOSTART=4001 PX4_GZ_MODEL=x500 ./build/px4_sitl_default/bin/px4 -i 0
PX4_SYS_AUTOSTART=4001 PX4_GZ_MODEL_POSE="0,2" PX4_GZ_MODEL=x500 ./build/px4_sitl_default/bin/px4 -i 1
Then open QGC, it will autoconnect to both on UDP 14550. Switching between and controlling both vehicles works as intended (set RC failsafe to HOLD to prevent them landing when you switch)

Multi Vehicle ArduCopter Simulation without shared mavproxy instance
Start two vehicles:
sim_vehicle.py -v ArduCopter -I 0 -w --sysid=1
sim_vehicle.py -v ArduCopter -I 1 -w --sysid=2
Start a router to multiplex the mavlink stream, I used cmavnode with the following config:

[sitl]
    type=udp
    localport=14550

[sitl 2]
    type=udp
    localport=14560

[gcs]
    type=udp
    targetport=14570

Then open QGC, make sure you have turned off UDP autoconnect, then start a link to 14570, both vehicles will connect on it.
You can then switch back and forward between the vehicles and the joystick control transfers as expected.

So I think this is actually not a problem except if using MAVProxy as the mavlink router, since it seems to be doing some sort of message filtering stopping the vehicle receiving these messages.

@vorobotics
Copy link

@JMare This is a great insight. I was doing all of my testing using separate instances of mavproxy, or separate PX4 instances, or separate real drones with separate links. Which is why I never was able to reproduce the multi vehicle issue.

@JMare
Copy link
Contributor

JMare commented Jul 24, 2023

It appears this issue is due to the MANUAL_CONTROL message having a field "target" rather than "target system". Because of this, MAVProxy doesn't know where to route it, and sends it to the active vehicle by default.

I opened an issue on the mavlink repo: mavlink/mavlink#2022

To work around it for now, apply this patch to mavproxy:

diff --git a/MAVProxy/mavproxy.py b/MAVProxy/mavproxy.py
index 7dff43a8..296348c0 100644
--- a/MAVProxy/mavproxy.py
+++ b/MAVProxy/mavproxy.py
@@ -858,6 +858,10 @@ def process_mavlink(slave):
     if allow_fwd:
         for m in msgs:
             target_sysid = getattr(m, 'target_system', -1)
+            '''MANUAL_CONTROL messages use target rather than target_system, so try both'''
+            if(target_sysid == -1):
+                target_sysid = getattr(m, 'target', -1)
+
             mbuf = m.get_msgbuf()
             if mpstate.settings.mavfwd_link > 0 and mpstate.settings.mavfwd_link <= len(mpstate.mav_master):
                 mpstate.mav_master[mpstate.settings.mavfwd_link-1].write(mbuf)

Then start SITL without MAVProxy:
sim_vehicle.py -v ArduCopter -w -n 2 --auto-sysid --no-mavproxy
And start your modified version of mavproxy:
python MAVProxy/mavproxy.py --master tcp:127.0.0.1:5760 --master tcp:127.0.0.1:5770 --out udp:127.0.0.1:14550

@zdanek
Copy link
Collaborator

zdanek commented Jul 24, 2023

This is a great analysis. @JMare we had experienced this on a physical connection. Single connection to RFD radio http://rfdesign.com.au/products/rfd900-modem/ with mesh config, that enables one antenna on ground station and a few drones connected.

AFAIK this radio uses mavlink, I mean, it's aware of mavlink, radio on ground station even sends heartbeat to gqc. So it interpretes mavlink somehow or just sends mavlink hb. Anyway, this happens on single physical conn.

The way I see it now, this might was due to

  • some problem in rfd soft
  • I was using old version of gqc (I have custom code) that had some problems with joystick (not likely as my colleague tested with official release and had same problem)
  • anything with target system mentioned by @vorobotics
  • an issue with rfd config that might be corrected (I doubt if this is real)

@JMare you've found an issue in mavproxy. Do you plan to make a PR?
I will test my gqc with your fix.

I'm still keen to rework joystick code. If you @JMare and maybe @vorobotics are you open for this, we might make a working y branch, meet online, and plan and split works to do.

@JMare
Copy link
Contributor

JMare commented Jul 24, 2023

Hmm, interesting that it affects a real connection through RFD900.
I would suggest, that if you can replicate the problem, take a look at the data in wireshark and check the output from QGC.
If you see that the QGC output is working, then we know the bug is elsewhere.
To get this data in wireshark, you could setup a UDP->Serial bridge to connect the RFD to QGroundcontrol, allowing you to inspect the packets in wireshark. I think this could be done with something like socat, or with mavlink_router or cmavnode (or even with mavproxy)

@JMare you've found an issue in mavproxy. Do you plan to make a PR?

I don't think the issue is really with mavproxy, I think the real issue is with the mavlink library.
The patch to mavproxy just works around the issue for testing.

Yep I'm open to helping rework the joystick support.

zdanek pushed a commit to zdanek/qgroundcontrol that referenced this issue Sep 13, 2023
…ehicle is changed

When there are multiple vehicles, and you select a vehicle, the joystick should switch over to the newly active vehicle, and only the active vehicle (so that joystick inputs are not sent to a vehicle you do not intend to control). 

To resolve this, we connect Vehicle to the activeVehicleAvailableChanged and activeVehicleChanged signals produced by the MultiVehicleManager. ALL vehicles disable joystick when activeVehicleAvailableChanged(false), because this signals when there is no longer an active vehicle available. When activeVehicleChanged is signalled, ONLY the currently active vehicle enables joystick. 

See issue mavlink#10544.
zdanek pushed a commit to zdanek/qgroundcontrol that referenced this issue Sep 22, 2023
…ehicle is changed

When there are multiple vehicles, and you select a vehicle, the joystick should switch over to the newly active vehicle, and only the active vehicle (so that joystick inputs are not sent to a vehicle you do not intend to control). 

To resolve this, we connect Vehicle to the activeVehicleAvailableChanged and activeVehicleChanged signals produced by the MultiVehicleManager. ALL vehicles disable joystick when activeVehicleAvailableChanged(false), because this signals when there is no longer an active vehicle available. When activeVehicleChanged is signalled, ONLY the currently active vehicle enables joystick. 

See issue mavlink#10544.
anketd added a commit to anketd/qgroundcontrol that referenced this issue Nov 22, 2023
* USBBoardInfo: show Cubes as CubePilot

Signed-off-by: Julian Oes <julian@oes.ch>

* Update PX4 Firmware metadata Wed Feb 22 01:56:40 UTC 2023

* Fix Analyze Page popup ownership

* OfflineMapButton: fix text overlapping on long tileset descriptions

* Fix unit test running

Details here: mavlink#10602

* Fix use of QString::QString.asprintf()

asprintf is a static method and does not modify the calling object.
This fix assigns the returned QString to the calling object.

Fixes issue mavlink#10450

* Vehicle: use double precision for COMMAND_INT

The whole point of COMMAND_INTs is that they have better resolution for
coordinates leveraging int32 for degrees*10^7. This resolution is lost
if we use float while handling the data instead of double.

Signed-off-by: Julian Oes <julian@oes.ch>

* Topomap of Svalbard

Adding a topografic map of Svalbard(and Norway)

* Update PX4 Firmware metadata Wed Mar  1 02:30:30 UTC 2023

* Update PX4 Firmware metadata Thu Mar  9 01:14:56 UTC 2023

* Adds MAV_CMD_DO_CHANGE_SPEED support (mavlink#10607)

Ability to digest climb speed and descent speed with mavlink command MAV_CMD_DO_CHANGE_SPEED

* remove snapcraft file (mavlink#10614)

* fix android udp h264 video record (mavlink#10610)

Co-authored-by: Luiz Kressin <luiz.kressin@gmail.com>

* FactMetaData: Fix default for decimal places (mavlink#10589)

When metadata was loaded from JSON and decimal places weren't
specified it was set to 0 when it should have been set to
kUknownDecimalPlaces (which will in turn default to 3).

---------

Co-authored-by: Don Gagne <dongagne@outlook.com>

* PhotoVideoControl: fix race condition for only picture cameras

* QGCCameraManager.cc: Increase camerainforequest to 10 (from 3)

* Lower scroll speed (mavlink#10584)

* Fix for mavlink#10574
* This will affect everywhere which uses the QGCFlickable base control. This is the majority of everywhere but may be mission in some places. If fast scrolling is seen in specific spot it needs to changes to use QGCFlickable instead of Flickable.

* FirmwareUpgrade: add thepeach board (mavlink#10586)

add firmware upgrade support for the peach k1/r1 boards

* PlanManager: drop spurious items for unexpected mission types (mavlink#10509)

* PlanManager: drop spurious items for unexpected mission types
* PlanManager: drive-by bug fix

* Joystick: Enable button up signal for hat buttons (mavlink#10543)

Releasing a hat button did not lead to _executeButtonAction being called with BUTTON_UP. This adds the hat buttons to lastBbuttonValues, such that the button-up transitions for hat buttons are recorded.

* Update QGCMapUrlEngine for wrong new() constructor (mavlink#10551)

_providersTable["Google Labels"] has constructed with GoogleTerrainMapProvider class as wrongly. It have to construct with GoogleLabelsMapProvider class.

* Fix incorrect property name: insIdParamsAvailable (mavlink#10562)

`insIdParamsAvailable` -> `ins1IdParamAvailable`

* Missionitem: Set condition_yaw default to absolute heading (mavlink#10594)

My experience is that I change heading to absolute direction, rather
than relative (because relative will accumulate any heading error on
incomplete yaw, especially if the command is executed while turning.)
The absolute heading is the most used/typical way of using this mission
item. This change does not affect missions that are already created,
only the default selection while creating a mission.
The default yaw rate is also very slow (unchanged) meaning that any
relative yaw command will result in an unknown result, unlress performed
long since last one relative.
Final reason: Scanning missions consists of with many waypoints are
always at an absolute heading. While "make a panoramic turn" with
relative amont of degrees, are usually single-command. So it is better
to default to a setting used for missions with many such commands.

Co-authored-by: forced_to_this_mess <eudhe@deed.no>

* PX4: Add missing sensor orientations to PX4 sensor setup UI (mavlink#10471)

The enumeration of sensor orientation was not up to date. Reported in:

mavlink#10465

I updated the enum based on the mavlink enum from here:

https://mavlink.io/en/messages/common.html#MAV_SENSOR_ORIENTATION

* Update PX4 Firmware metadata Wed Mar 15 04:17:15 UTC 2023

* Github actions: update actions-download-file version

Used to download files in windows workflow. Update from v1 to v1.3.0 to
remove warnings about deprecated set-output command.

* Github actions: Remove android-33-ext5 from build image

Github workflow image ubuntu-20.04 version 20230313.1 have added Android
SDK Platform android-33-ext5. Something, possible the gradle version
bundled with qt does not parse this correctly, and sets
androidCompileSdkVersion in android-build/gradle.properties to "ext5"
instead of expected "33". This commit is a quick fix to the problem, so
the build will revert to android-33 which was used before 20230109.1.

This fix was previously added for android-33-ext4 in image 20230109.1 in
commit 6f636e7.

* Add class to load and transmit Custom Actions

These Custom Actions are defined in a JSON file, and define MAVLink
messages to send to the current active vehicle. These Custom Actions
will be added to the Fly View.

* Add Custom Actions directory to App Settings

This is required to create a storage location for Android.

* Add FlyView Settings to configure Custom Actions

* Add Custom Actions to existing Guided Actions pane

* Add Custom Action settings to GeneralSettings UI page

* Mavlink: Partially update submodule to 97c50e128768c9b95c5542b8fc751198b1af96da

* Vehicle.h: public getter for vehicle compid

* Remote ID: create remote ID manager and settings

* Remote ID: include artwork

* Remote ID: Frontend work

* Remote ID: implement in vehicle

* Update PX4 Firmware metadata Wed Mar 22 05:13:20 UTC 2023

* CI: Remove travis CI related configuration

We use github actions now and I remove the travis configuration file and
change the Vagrantfile that uses the travis file for configuration. I
remove build_ios script as well as it is nowhere in use and seems to be
part of the travis CI setup.

* QGCPostLinkCommon: Add missing Windows DLLs
...from Microsoft Visual C++ Redistributable

* deploy: windows: Update to Redis17, add missing DLLs

In runtime, QGC needs:
 - `vcruntime140.dll`
 - `vcruntime140_1.dll`
 - `msvcp140.dll`
 - `msvcp140_1.dll`

The update is necessary because `vcruntime140_1.dll` is only
shipped after MSVC Redistributables version 17

* Vehicle: remove unused _joystickChanged

* ComponentInformation: add metadata translation support

- mavlink discussion: mavlink/mavlink#1656
- adds a web download file cache use for http[s] metadata with 3 days
  caching (if the metadata does not set a crc)

* qgcunittest: add unit test for metadata translation

* QGCApplication.cc: Fix RemoteID qml name

* RemoteIDManager: Fix GPS bad not being detected:

we were using the geopositioninfo.isValid() in order to discard
GPS and send lat/long/alt 0, but this function returns true
even if latest GPS refresh was long time ago, so now instead
we are using _gcsGPSGood, which takes into account the 5 seconds
timeout as well

* Show stock image as background when Waiting For Video (mavlink#10604)

Add background to make it easier to read


Update

* Add keyboard support to SliderSwitch

* Update PX4 Firmware metadata Fri Mar 31 20:31:03 UTC 2023

* Enable joystick automatically on the active vehicle when the active vehicle is changed

When there are multiple vehicles, and you select a vehicle, the joystick should switch over to the newly active vehicle, and only the active vehicle (so that joystick inputs are not sent to a vehicle you do not intend to control). 

To resolve this, we connect Vehicle to the activeVehicleAvailableChanged and activeVehicleChanged signals produced by the MultiVehicleManager. ALL vehicles disable joystick when activeVehicleAvailableChanged(false), because this signals when there is no longer an active vehicle available. When activeVehicleChanged is signalled, ONLY the currently active vehicle enables joystick. 

See issue mavlink#10544.

* Enable ROIModeCapability for ArduPilot vehicles

This enables two UI features when connected to an ArduPilot vehicle:

  1. click the map in the Fly View and send an "ROI at Location" command; and
  2. add an ROI as part of a Mission Plan.

Note that there is no way to determine if an ArduPilot build will accept
these commands. The commands will be accepted if the current connected
ArduPilot vehicle has both:

  1. the Mount driver included (i.e. compiled with HAL_MOUNT_ENABLED); and
  2. a Mount driver enabled (via the MNTn_TYPE parameter)

If ROIs are not supported, the ArduPilot vehicle will respond with a
MAV_RESULT_UNSUPPORTED command ack message.

Addresses mavlink#10640.

* Fix Cmake build

-Add missing files for remote id
-Add missing files for custom action

* Increase C++ standard to C++17 as for qmake build

* Improve warnings for CustomActionManager

Use the GuidedActionsControllerLog for logging, and only load JSON in
the constructor if we have a path defined.

* remove trailing whitespace in metainfo file

* add 'content_rating' tag via https://odrs.gnome.org/oars

* change metadata licence to CC0-1.0

* src: Improve debug messages on the camera stream logic

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>

* MessageIndicator: Enable copy/paste of messages

Requested by user here:

mavlink#4503

I'm not sure about the `SelectionColor` and `SelectedTextColor` values.

* PlanToolBarIndicators: Use more descriptive label for distance to WP

The current implementation displays two different distances by the same
name. One of the distances is actually the distance to the previous
waypoint. For the user its "hard" to tell which one is which. I try to
resolve this with a more descriptive label for the distance to the
previous waypoint.

An alternative is maybe to rename the other distance to total distance
or total mission distance.

* Update PX4 Firmware metadata Thu Apr  6 10:45:29 UTC 2023

* Update PX4 Firmware metadata Thu Apr 13 15:48:59 UTC 2023

* Added PX4 FMU ModalAI FCv2 to USBBoardInfo.json

* libs: OpenSSL update to 1.1.1l_1.0.2u, fixing elevation maps download:

Elevation maps download wasn't working on android,
reporting TLS error. This commit fixes the issue

* .gitmodules: change android openssl remote to github.com/KDAB/android_openssl:

It was pointing to an Auterion repo before. This
Auterion repo didn't have any modification over
the original, it has been like that for 3 years,
so it makes sense to just point to the original one

* Update PX4 Firmware metadata Tue Apr 18 06:29:39 UTC 2023

* Update PX4 Firmware metadata Wed Apr 19 09:10:54 UTC 2023

* Update PX4 Firmware metadata Thu Apr 20 00:59:42 UTC 2023

* generate release information for metainfo file from git tag

* Fix Status Text option

Status text messages were being sent too early in the creation of the MockLink. This would cause the ui to not see them. Making the whole thing useless for testing.

* Add ability to reset only Error level vehicle messages

* New user model for critical vehicle messages

* Popup smaller
* Text indicates these are Vehicle Messages
* If there are additional messages which come in after display closing the popup will dropdown the Message Indicator in the toolbar

* Remove logging

* Update PX4 Firmware metadata Sat Apr 29 03:19:55 UTC 2023

* Camera: don't decode unused heartbeat (mavlink#10669)

Just saving a few CPU cycles.

Signed-off-by: Julian Oes <julian@oes.ch>

* Vehicle: fix odd warning (mavlink#10668)

This fixes the warning that I get with GCC 11.3:

/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:34:

warning: ‘__builtin_strncpy’ writing 50 bytes into a region of size 24 overflows the destination [-Wstringop-overflow=]

   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |                                  ^
/usr/include/x86_64-linux-gnu/bits/string_fortified.h: In member function ‘_handleStatusText’:
../Qt/5.15.2/gcc_64/include/QtCore/qarraydata.h:129:8: note: destination object ‘<anonymous>’ of size 24
  129 | struct QTypedArrayData
      |        ^

Signed-off-by: Julian Oes <julian@oes.ch>

* Update PX4 Firmware metadata Sat May  6 22:01:00 UTC 2023

* deploy: update driver.msi (mavlink#10679)

The file was downloaded from
https://firmware.ardupilot.org/Tools/MissionPlanner/driver.msi
on 2023-05-08.

Signed-off-by: Julian Oes <julian@oes.ch>

* Update PX4 Firmware metadata Fri May 12 12:32:51 UTC 2023

* Update PX4 Firmware metadata Tue May 16 09:04:22 UTC 2023

* TransectStyleComplexItem.cc: Fix bug generating empty surveys when no terrain data:

Selecting terrain data on surverys was generating an empty survey if the polygon
was on an area where QGC doesn't have terrain height info about.

This is because QGC was waiting on terrain info to build the path on such surveys,
which is not needed at all, because terrain frame just specifies an altitude above
terrain, and relies on the vehicle for being able to calculate that height, by terrain
database or by altitude sensors, having terrain height information is not needed at all
to generate this kind of surveys

* Ardupilotmega flag added

* Used NO_ARDUPILOT_DIALECT for RangeFinder Message Callback

* VideoReceiver: call stop and cleanup teeProbe

This fixes regular segfaults on exit for me.

Signed-off-by: Julian Oes <julian@oes.ch>

* repair hygrometer message parsering

* Vehicle: Add RAW_IMU to displayable telemetry

* Add Vehicle fact timeToHome

TimeToHome fact calculates the time in seconds till the UAV reaches the
home position. We take the distance to home and divide it by the
current ground speed to get the seconds till we arrive at the home
point. I did not add any fancy logic to find out if we actually fly
towards the home point or are in RTL so the value shows increasing
seconds even if we fly away from the home point

* Update PX4 Firmware metadata Fri May 26 14:32:54 UTC 2023

* Update PX4 Firmware metadata Wed May 31 16:46:19 UTC 2023

* Update PX4 Firmware metadata Thu Jun  1 07:17:29 UTC 2023

* Remote id fronted: hide all indicators if RID not connected:

All this remote id feature depends on a device being detected
so it makes sense to not show the rest of the flags until
a healthy connection has been detected.

Also change label from RID COMMS to NOT CONNECTED when there is
no RID connection, so it is more descriptive to the user.

* Fix Fly View Typo

* Update PX4 Firmware metadata Mon Jun  5 16:48:11 UTC 2023

* Update PX4 Firmware metadata Wed Jun  7 17:08:50 UTC 2023

* Update PX4 Firmware metadata Fri Jun  9 10:43:03 UTC 2023

* Update PX4 Firmware metadata Mon Jun 12 08:31:25 UTC 2023

* Replaced install with install-qt

* Update PX4 Firmware metadata Thu Jun 22 12:07:58 UTC 2023

* MainRootWindow: fix bug toolbar dissapearing:

In the edge scenario where we set video view in full screen
and for some reason QGC brings us to setup view ( if the
vehicle has calibration/setup pending ) the toolbar would
dissapear, thus not being able to get out of that state

* VirtualJoystick: Fix stick position while screen size changes

Resolve of mavlink#10666, while the QGC window is resizing, both virtual
joysticks are not centered causing dangerous behavior. Now, if the screen
size is changed, both joysticks will be centered while the screen resize
is stopped.

* Add BackEnd logic for GripperAction Feature

Created a Q_Property for return grip_enable option state to the
frontend and a parser for setGripperAction function

* Add Frontend UI for GripperAction Feature

Now the user can release and grab the gripper while the UAV has
motors armed with the action button and also while the motors are
disarmed in a specific toolbar option.

* Update PX4 Firmware metadata Mon Jun 26 15:53:48 UTC 2023

* Update PX4 Firmware metadata Tue Jun 27 09:00:52 UTC 2023

* Update PX4 Firmware metadata Mon Jul  3 08:41:32 UTC 2023

* Remove AirMap support (mavlink#10726)

Airmap platform SDK is no longer supported by Airmap

* Vagrantfile: move to use Ubuntu Jammy for Vagrant builds

* Vagrant: increase number of allowed open files

1024 is the default, which is not enough for the QGC link step

* Update PX4 Firmware metadata Tue Jul 11 09:56:23 UTC 2023

* Update PX4 Firmware metadata Wed Jul 12 16:34:08 UTC 2023

* Fix aimap deleting for cmake build

* Use MAV_CMD_DO_SET_MODE to change modes on ArduPilot-base vehicles

ArduPilot has supported this command for 5.5 years now.  Probably time to start using it.  Copter 3.6.0 has it, 3.5.x does not.

* APMFirmwarePlugin, RCRSSIIncidator: solve bug where no valid rssi would show indicator:

There was a bug scaling rc rssi from rc_channels mavlink
message where it was scaled to 0-100 from 0-255, and this
was wrong because 255 is meant to be invalid, and AP uses

0-254 anyway. We must leave 255 as it is so the frontend
can understand if we don't have data.

Also, in RCRSSIIndicator, we don't show the indicator anymore
if data is not valid, there is no point

* GeneralSettings: more desctiptive definition label for updateHomePosition setting:

This effectively sends a mav cmd do_set_home
when GCS location changes. This affects return
to home flight modes, and should be explained
explicitely

* DO_SET_HOME command support:

This commit adds support for setting home clicking on map.
It is shown as another action in the submenu when we click
over the map with an active vehicle online.

As per mavlink specs, this command must use AMSL altitude,
so we need to first query terrain altitude, and when received
send the command.

Several checks have been implemented, and in case terrain
altitude is not shown at the selected location a popup will
appear indicating there are no terrain data for the specified location

* APM support forwarding: Add artwork

* APM support forwarding: Add new host to appSettings:

This new host is different to the standard mavlink forwarding
one because it is meant to get disconnected when QGC closes
so the users don't leave by mistake the connection to the
support servers opened

* APM support forwarding: Add APMRemoteSupportComponent to APM conf submenus

* APM support forwarding: linkManager and MavlinkProtocol backend implementation

* APM support forwarding: Add toolbar indicator just to APMFirmwarePlugin

* LinkManager: use range based loop instead when getting links

* Update PX4 Firmware metadata Mon Jul 17 09:23:30 UTC 2023

* add Sentera 65R camera model

* Update PX4 Firmware metadata Tue Jul 25 21:20:11 UTC 2023

* Update PX4 Firmware metadata Thu Jul 27 14:30:37 UTC 2023

* ToolStrip.qml: Fix Flickable height, it was bigger than panel

* Allow app data to save to sd card on android

* Fix sd card permission

* Update PX4 Firmware metadata Fri Aug  4 15:21:33 UTC 2023

* PX4SimpleFlightModes.qml: Rename the variable for bugfix

This was introduced in
mavlink@d5dc4f1,
and the refactor didn't fix the case for RC_MAP_FLAPS case correctly,
leading to the bug report: PX4/PX4-Autopilot#21927

* Support custom builds with joysticks which are buttons only

For example a Herelink controller custom build will use this.

* Update PX4 Firmware metadata Tue Aug  8 17:55:21 UTC 2023

* Remove noisy qmake output

* Android support for serial/bluetooth disabling

* Fix turning on edit for mobile

* Prevent virtual keyboard from popping up on combo box entry

* Increase touch area border size for better visibility

* Add showTouchAreas support

* Allow easter eggs to work on mobile

* Increase size of click area for flight mode change

* Switch date format to fix small screens

* Notify user of touch area toggle

* Update for latest Copter fence support

* Add support for mavlink FENCE_STATUS

* New translations qgc.ts (Chinese Simplified)

* New translations qgc-json.ts (Chinese Simplified)

* Android supports no serial/bluetooth build and home app

Fixes

* Fix skipping of NMEA serial ports

QGCSerialPortInfo skips over serial ports which are not the first in any
composite device. However this is how some internal NMEA GPS's present.
So if the description contains 'NMEA', dont skip them.

* Fix UI Displaying incorrect serial port list

The list of serial ports that ended up in the UI was from
QSerialPortInfo::availablePorts(), however the list available
to be used is a filtered list from QGCSerialPortInfo::availablePorts()
Changed so that the UI pulls the filtered list, and no ports present
which dont actually work.

* PositionManager: clear values on changing source

This prevents getting stuck with old values latched in the UI.
Which would happen if the new position source didn't get an update.

* Fix normal and adsb vehicle sizing

Fix

* Rework Vehicle Joystick Handling

This fixes a number of issues with the way joysticks were handled
in a multi vehicle context. I reworked the way vehicle determine
to enable and capture the joystick input, as well as seperating
setJoystickEnable from saveJoystick to seperate runtime and saved
state.

* Fix an unbounded loop in the joystick code

This fixes a bug introduced in b62a533 which, when a joystick was disabled
and uncalibrated, caused unbounded recursive calls to Joystick::startPolling.

* Add APMRemoteSupportComponent to CMake Lists

This update modifies the CMakeLists.txt files in both the AutoPilotPlugins directory and within the APM subdirectory, adding APMRemoteSupportComponent to the list of components included in the project's build. This change is necessary to ensure that the new APMremoteSupportComponent is compiled when the project is built.

* apply selected color to InstrumentValueLabel text

* Update PX4 Firmware metadata Mon Aug 21 15:20:25 UTC 2023

* Revert "Support custom builds with joysticks which are buttons only"

This reverts commit 48d1441.

* Revert deleted functionality

* mavlink: update submodule

* QGCExternalLibs.pri: switch to all mavlink dialect by default

This allows to use messages from development.xml

* FirmwareUpgradeController: remove unuse variables & use https for firmware.ardupilot.org

* QGCFileDownload: handle OpenSSL build time vs runtime version mismatch

* perf(MapEngine): avoid some unnecessary string copies

* feat: replace airmap terrain with copernicus

* feat: give credit to elevation provider

* Update PX4 Firmware metadata Mon Aug 28 16:33:36 UTC 2023

* Joysticks buttons only support, allow joystick selection override

* Add numericValuesOnly support

* Set numericValuesOnly on calculator entry fields

* Implement APM circle geofence from params

Both PX4 and APM supports circular geofences around the home point.
QGC with PX4 displays this by checking GF_MAX_HOR_DIST.
This commit adds equivalent functionality for APM.
Params used on APM are FENCE_ENABLE,FENCE_TYPE,FENCE_RADIUS.
Tested with ArduCopter 4.3, ArduPlane master, and PX4 1.13.

* Change button name when forced to buttons only

* Settings/VideoManager: add Herelink video stream

This adds two video settings:

1. QGC running on Herelink connecting to the AirUnit.
2. QGC running on any device connected to Herelink's hotspot.

By default (without custom build) only 2. is enabled.

Signed-off-by: Julian Oes <julian@oes.ch>

* Update PX4 Firmware metadata Tue Sep  5 15:49:42 UTC 2023

* Update PX4 Firmware metadata Thu Sep  7 19:04:57 UTC 2023

* fix FirmwarePlugin: increase arming timeout to 1.5s

As the arming flag is set from the heartbeat received at 1Hz, we need to
wait a bit longer than 1s.

The 1s timeout sometimes led to this error message when trying to start a
mission: "Unable to start mission: Vehicle rejected arming."

Fixes PX4/PX4-Autopilot#22042

* Update PX4 Firmware metadata Wed Sep 20 14:28:08 UTC 2023

* Update PX4 Firmware metadata Wed Sep 20 16:43:51 UTC 2023

* Update PX4 Firmware metadata Thu Sep 21 14:00:13 UTC 2023

* libevents: update submodule

* Vehicle: fix html escaping for events & rich text rendering

Also removes unused getLatestError()

* MessageIndicator: handle url & parameter links

* ci: limit git fetch depth to 1

Fetching failed because the remote changed in a submodule:
fatal: remote error: upload-pack: not our ref 391786c6c3abdd3eeb993a3154f1f2a4cfe137a0
Errors during submodule fetch:
	libs/cpp/parse/nlohmann_json

* VideoSettings: Flag Herelink streams as configured:

otherwise videoManager won't restart the receiver and video
won't work properly when configured for Herelink

* Update PX4 Firmware metadata Fri Oct  6 15:36:41 UTC 2023

* Update PX4 Firmware metadata Mon Oct  9 06:48:52 UTC 2023

* Vehicle: remove unused extraJoystickFlightModes

* Vehicle: implement MAVLink standard modes

* Vehicle: handle MAVLINK_MSG_ID_CURRENT_MODE

* joystick: handle dynamic flight mode updates

* StandardModes: only enable for daily builds

* Set instrument Value have custom color as label
Fix instrument panel and editor layout

* MissionManager: Support for MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW

* PhotoVideoControl.qml: Fix toggleShotting when no mavlink camera

* Optimize map provider iteration to prevent app crashes

Changed from QHashIterator to using a constant iterator for iterating through the map providers in _providersTable. This change prevents application crashes during a map download session caused by the potential modification of an implicitly shared hash.

* H.265(HEVC) decoder ranking adjusted for VA-API and libav

Only gstreamer-vaapi plugin modules addressed as in the original code. Possibly need to have va plugin support too, but on a lower rank.

* Fix typo in Fahrenheit name

* Update PX4 Firmware metadata Tue Oct 31 14:27:50 UTC 2023

* APM: cope with IN_PROGRESS messages from autopilot

* Hardware: Add support for Pixhawk FMUv6XRT

* Update USBBoardInfo.json

* Remove android sdks newer than 33

This will force gradle to use sdsk 33 only

* Vehicle: update mode when StandardModes::modesUpdated is emitted

Required because the label of the currently active mode might change.
E.g. when an external mode gets registered but was already selected.

* Vehicle: add sendMavCommandIntWithHandler

equivalent to the non-int function, allows a caller to specify a callback when ACK is received

* APMFirmwarePlugin: reposition using MAV_CMD_DO_REPOSITION

... falls back to using old mission-item method if reposition is not supported, which it is not for Sub

* AutoPilotPlugins: remove APMCompassCal

ArduPilot's onboard calibration is superior to this old-style "offboard compass calibration", and we've just merged a patch which removes the mavlink API call to set the sensor offsets into the ArduPilot master branch.

* qgroundcotrol.pro: do not build removed APMCompassCal

* QGCTextField: fix forcing the use of virtual numeric keyboard

* FlyView: add a toolinset viewer in the fly view

this is disabled by default but can be manually uncommented in the
flyview to test or debug tool insets

* FlyView: Fix insets on the widget layer

makes all elements on the fly view widget layer properly pass out
tool insets

* FlyView: Fix tool insets in the custom layer

There is a default custom layer which is used in a non-custom build.
This commit makes this layer properly pass through the tool insets
unchanged

* FlyViewMap: Check corners to recenter the vehicle

Previously the FlyViewMap only checked center tool insets to determine
whether to recenter the vehicle. This change makes it also check if the
vehicle has passed under a corner element using the corner tool insets.
This means the view will recenter if the vehicle flys under the
instrument panel for example.

* FlyView: Make insets in the widget layer explicit

Rename properties to match the inset that they correspond to for better
maintainability

* custom-example: update qrc files

This is an auto update of the custom example qrc files using
updateqrc.py

* custom-example: Fix tool insets in flyview

Make the custom fly view layer properly inherit so as to pass them through to the map,
and also use them to dodge the virtual joysticks.

* custom-example: add example of tool inset use

this adds a (commented by default) rectangle which uses the tool insets
from the widget layer to dynamically size itself. This is an example of
how to use tool insets to position something on the custom-layer

* New translations qgc.ts (Chinese Simplified)

* New translations qgc.ts (Chinese Simplified)

* New translations qgc.ts (Chinese Simplified)

* Use all mavlink includes instead of ardupilotmega for cmake build

Switched mavlink include option from 'ardupilotmega' to 'all' in the CMakeLists file. This modification will allow the use of all the functionalities offered by the mavlink library. the range of functionalities that can be utilized from the mavlink library.

* Update PX4 Firmware metadata Tue Nov  7 12:00:01 UTC 2023

* Update PX4 Firmware metadata Tue Nov  7 18:10:53 UTC 2023

* Update PX4 Firmware metadata Thu Nov  9 09:26:52 UTC 2023

* ignore unused-but-set-variable on mac builds to suppress errors in QGCTileCacheWorker.cpp and eigen

* Update PX4 Firmware metadata Fri Nov 10 23:41:11 UTC 2023

* Update PX4 Firmware metadata Tue Nov 14 17:33:10 UTC 2023

* Update PX4 Firmware metadata Wed Nov 15 14:05:15 UTC 2023

* Fix up support for Mavlink All dialect

* Update PX4 Firmware metadata Thu Nov 16 09:18:17 UTC 2023

* Fix up support for MAV_RESULT_IN_PROGRESS

* Update unit tests to test for in progress
* Split result handler into regular ack and in progress ack callbacks

* Hack for PX4 auto-tune

* Update PX4 Firmware metadata Fri Nov 17 10:06:41 UTC 2023

* Ardupilot: Add support for fixed wing airspeed change

* FactMetadata, QmlUnitsConversion: support for speed unit translation

* Fix altitude slider and guidedactions for speed action:

There were some errors where fixed wing would not show the action,
also unit conversion support for speed was added

* Change function name *changeSpeed to changeSpeedMetersSecond:

Ultimately it sends a MAV_CMD_DO_CHANGE_SPEED in meters
per second, so it is clearer if we have this name for the
function, could help avoiding confusion in the future

* Fix setup of ANDROID_PACKAGE_SOURCE_DIR

Remove double call to make

Specify androiddeployqt location

Revert "Specify androiddeployqt location"

This reverts commit cc307cf.

Revert "Remove double call to make"

This reverts commit 3fee0e9.

Remove PRE_TARGETDEPS

Fix target dependency to prevent make loop

* Vehicle, qgroundcontrol.pro/qrc: Add support for EFI, and Generator factGroups

* Vehicle.h: remove unused variable

* Vehicle: move _doSetHomeTerrainReceived to private slots

* Vehicle: add altitude above terrain fact and implementation

* Update PX4 Firmware metadata Mon Nov 20 15:03:47 UTC 2023

* Look for gstreamer on D drive as well as C

Fix

* FactMetadata: Make minForType() and minForType() public static

And make minIsDefaultForType() and maxIsDefaultForType() dynamic rather
than using a flag.

* MissionCommandUIInfo: Add min() and max() fields

* SimpleMissionItem: Set fact min and max from paramInfo

* MavCmdInfoCommon.json: Add min and max values

* PhotoVideoControl.qml: Fixed if bug based on odd qt qml behavior

* Stable version check on mobile builds

---------

Signed-off-by: Julian Oes <julian@oes.ch>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: PX4BuildBot <bot@px4.io>
Co-authored-by: Don Gagne <don@thegagnes.com>
Co-authored-by: davidsastresas <davidsastresas@gmail.com>
Co-authored-by: Don Gagne <dongagne@outlook.com>
Co-authored-by: Robbie Drage <robbie.drage@spsautomation.com>
Co-authored-by: AndKe <andre.kjellstrup@gmail.com>
Co-authored-by: FARHANG <46557204+farhangnaderi@users.noreply.github.com>
Co-authored-by: Christian Rauch <Rauch.Christian@gmx.de>
Co-authored-by: Patrick José Pereira <patrickelectric@gmail.com>
Co-authored-by: Luiz Kressin <luiz.kressin@gmail.com>
Co-authored-by: Don Gagne <DonLakeFlyer@users.noreply.github.com>
Co-authored-by: WTPENGUIN <ccho2932@naver.com>
Co-authored-by: Mathieu Mirmont <mat@parad0x.org>
Co-authored-by: Kjersti Brynestad <36163186+kjersbry@users.noreply.github.com>
Co-authored-by: Tevhit Karsli <tevhitkarsli@hotmail.com>
Co-authored-by: Nick Exton <NExton@sypaq.com.au>
Co-authored-by: André Kjellstrup <1468842+AndKe@users.noreply.github.com>
Co-authored-by: forced_to_this_mess <eudhe@deed.no>
Co-authored-by: Philipp Borgers <borgers@mi.fu-berlin.de>
Co-authored-by: Knut Hjorth <knut.hjorth@aviant.no>
Co-authored-by: João Antônio Cardoso <joao.maker@gmail.com>
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
Co-authored-by: Christopher Vo <vo@sentienrobotics.com>
Co-authored-by: Sergii Lisovenko <sergeylcpp@gmail.com>
Co-authored-by: jnomikos <john.nomikos55@gmail.com>
Co-authored-by: Harsh Mittal <harshmittal2210@gmail.com>
Co-authored-by: Roman Dvořák <romandvorak@mlab.cz>
Co-authored-by: DieBorr <dieborr3@gmail.com>
Co-authored-by: Kristoffer Bergman <kribe606@gmail.com>
Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
Co-authored-by: Sergii Lisovenko <2522054+s-lisovenko@users.noreply.github.com>
Co-authored-by: Matt Skelton <Matt.Skelton@sentera.com>
Co-authored-by: Junwoo Hwang <junwoo091400@gmail.com>
Co-authored-by: James Mare <jamesmare12@gmail.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: leonardosimovic <leonardo@auterion.com>
Co-authored-by: Zdanek <bartek.zdanowski@gmail.com>
Co-authored-by: Oleksiy Protas <elfy.ua@gmail.com>
Co-authored-by: Colin Wong <cwongmath@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Hamza ZOGHMAR <ha.zoghmar@gmail.com>
shift-tyson pushed a commit to Shift-Environmental/shift-qgc that referenced this issue May 17, 2024
…ehicle is changed

When there are multiple vehicles, and you select a vehicle, the joystick should switch over to the newly active vehicle, and only the active vehicle (so that joystick inputs are not sent to a vehicle you do not intend to control). 

To resolve this, we connect Vehicle to the activeVehicleAvailableChanged and activeVehicleChanged signals produced by the MultiVehicleManager. ALL vehicles disable joystick when activeVehicleAvailableChanged(false), because this signals when there is no longer an active vehicle available. When activeVehicleChanged is signalled, ONLY the currently active vehicle enables joystick. 

See issue mavlink#10544.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants