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

Incomplete Parameter Detection #10006

Open
ES-Alexander opened this issue Nov 9, 2021 · 2 comments
Open

Incomplete Parameter Detection #10006

ES-Alexander opened this issue Nov 9, 2021 · 2 comments

Comments

@ES-Alexander
Copy link

ES-Alexander commented Nov 9, 2021

Expected Behaviour

All parameters properly detected (including metadata) when QGC connects to vehicle

Current Behaviour

Some JS button function values are not detected/recognised if QGC is open before the vehicle is turned on+connected.

Steps to Reproduce:

Please provide an unambiguous set of steps to reproduce the current behavior

  1. Connect a joystick to computer (I believe this is also fine after step 2 or 3)
  2. Open QGC
  3. Power up ArduSub vehicle and connect it to computer running QGC
  4. Go to Vehicle Setup/Joystick/Button Assignment and check the available button function options (after relay_2_toggle should be relay_3_on, but is actually custom_1 (which is also valid, just should come later); last value should be relay_4_momentary but is actually custom_6)

System Information

When posting bug reports, include the following information

  • Operating System:
    • Windows 10, via Parallels on MacOS 11.6 and 12.3
    • Windows 10 (normal install)
    • MacOS 12.3
  • QGC Version:
    • NOT 4.0.5
    • 4.1.7, 4.1.4, and 4.1.2 (suspected >= 4.1)
  • QGC build: stable
  • Flight Controller: Pixhawk I
  • Autopilot (with version): ArduSub 4.0.3 (stable), 4.1.0 (beta)

Detailed Description

Bug found and discussed a bit in this forum thread.

Noteworthy points from my testing are:

  • In particular, a joystick button set to the servo_3_min_max_momentary function has its function displayed as Unknown: 85. More generally, BTNn_FUNCTIONs 57-87 and 101-107 seem to all be missing from the available function names in the dropdown (see screenshots).
  • restarting QGC while the vehicle is already on and connected resolves the issue
  • disconnecting the vehicle (physically and then with the "Disconnect" button) then reconnecting it also resolves the issue
  • issue only seems to appear when the vehicle has been turned off (e.g. disconnecting an on vehicle, and restarting QGC before reconnecting the vehicle doesn't seem to have the same issue) - this point should probably be verified independently, because Mac Parallels might be doing something weird with my connections to QGC on Windows

Log Files and Screenshots

  • QGC Console Log:
    button_functions-invalid-behaviour.txt
    Log includes initial connection, with missing button functions, then I reconnected the vehicle (described in "Detailed Description") and the button functions were all available (search for UDPLink to find the two connection points).
  • Autopilot logs when available (post a link).
  • Screenshots of QGC to help identify the current issue/bug behavior.
Missing joystick button functions - Unknown:85:

missing functions, unknown:85

Joystick button functions as expected:

functions as expected

@ES-Alexander
Copy link
Author

ES-Alexander commented Apr 8, 2022

This was raised again in this forum post, so I decided to look into it a bit more.

I've just confirmed that this issue is still present as of QGC 4.1.7, in both Windows 10 and MacOS (which makes sense, since it hasn't been targeted for a fix). It is also apparently present in ArduSub 4.1.0 (beta), so not confined to 4.0.x firmware.

I did find however that while the issue is present when connecting via Companion, it is not present when connecting via BlueOS. I've asked internally (in Blue Robotics) whether there are known differences in the connection setup. From what I can determine it seems that both use mavproxy.py as an intermediary, although that may be incorrect for BlueOS, or it may use a more recent version than Companion.

Edit: BlueOS apparently uses mavlink-router instead of mavproxy. It's unclear whether the actual issue here is in QGC or mavproxy

@Williangalvani
Copy link
Contributor

These issues are usually related to metadata files.
I recently updated metadata for Sub 4.1 in Master (QGC 4.2?):
https://github.com/mavlink/qgroundcontrol/blob/master/src/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.4.1.xml#L2439

One other cause for this is that sometimes QGC fails to identify the vehicle and load the proper metadata. This is usually noticeable as some SUB-specific UI fails to load, and QGC loads "flight modes" and other copter stuff instead.

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

3 participants