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

Add a GUI for showing RC and servo channels #1330

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

stephendade
Copy link
Contributor

As per the below screenshot, this adds GUI windows for showing the current values of the RC inputs and Servo outputs. Useful for debugging any issues with inputs and outputs.

It can be launched via rc guiin or rc guiout to show the RC in and Servo out windows respectively. Otherwise, there is a menu for them in the console (rc menu).

Tested in SITL.

Screenshot from 2024-02-29 16-26-42

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  overload 1: argument 2 has unexpected type 'float'
  overload 2: argument 2 has unexpected type 'float'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/wx/lib/agw/pygauge.py", line 380, in OnPaint
    dc.DrawText(drawString, textXPos, textYPos)
TypeError: DC.DrawText(): arguments did not match any overloaded call:
  overload 1: argument 2 has unexpected type 'float'
  overload 2: argument 2 has unexpected type 'float'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/wx/lib/agw/pygauge.py", line 380, in OnPaint
    dc.DrawText(drawString, textXPos, textYPos)
TypeError: DC.DrawText(): arguments did not match any overloaded call:
  overload 1: argument 2 has unexpected type 'float'
  overload 2: argument 2 has unexpected type 'float'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/wx/lib/agw/pygauge.py", line 380, in OnPaint
    dc.DrawText(drawString, textXPos, textYPos)
TypeError: DC.DrawText(): arguments did not match any overloaded call:
  overload 1: argument 2 has unexpected type 'float'
  overload 2: argument 2 has unexpected type 'float'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/wx/lib/agw/pygauge.py", line 380, in OnPaint
    dc.DrawText(drawString, textXPos, textYPos)
TypeError: DC.DrawText(): arguments did not match any overloaded call:
  overload 1: argument 2 has unexpected type 'float'
  overload 2: argument 2 has unexpected type 'float'

@stephendade
Copy link
Contributor Author

@peterbarker - haven't come across that error. What version of wxpython are you running? I'm running v4.2.1

@peterbarker
Copy link
Contributor

@peterbarker - haven't come across that error. What version of wxpython are you running? I'm running v4.2.1

>>> wx.__version__
'4.0.7'
>>> 

... it's OK to require a more recent version - but we should catch the problem and tell the user something useful :-) Perhaps fail to load the module in this case?

@stephendade
Copy link
Contributor Author

Well, this was an interesting one. According to https://discuss.wxpython.org/t/float-values-no-longer-accepted-in-wxpython-4-1-2a1-dev5259/35731 and some testing if a user is running Python 3.10+, they also need to be running wxpython 4.2.1+

I've now added in a check for this.

@tridge
Copy link
Contributor

tridge commented Mar 31, 2024

@stephendade can you also add it to a Tools/ menu on the console so users can find it?
thanks!

@stephendade
Copy link
Contributor Author

@stephendade can you also add it to a Tools/ menu on the console so users can find it?
thanks!

I've already got an "RC" menu in the terminal with menu items for both. Are you thinking a more generic "Tools" menu so we can add other useful things later?

@stephendade
Copy link
Contributor Author

add it to a Tools/ menu on the console so users can find it?

Done

@tridge tridge merged commit 540ca6b into ArduPilot:master Apr 12, 2024
2 checks passed
@stephendade stephendade deleted the rcgui branch October 21, 2024 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants