-
Notifications
You must be signed in to change notification settings - Fork 691
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
Conversation
There was a problem hiding this 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'
@peterbarker - haven't come across that error. What version of wxpython are you running? I'm running v4.2.1 |
... 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? |
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. |
@stephendade can you also add it to a Tools/ menu on the console so users can find it? |
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? |
Done |
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
orrc 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.