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

fix altMarker set_data error #1490

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

Huibean
Copy link
Contributor

@Huibean Huibean commented Dec 1, 2024

fix 2D line set_data error in ui update loop
https://matplotlib.org/stable/api/_as_gen/matplotlib.lines.Line2D.html#matplotlib.lines.Line2D.set_data

RuntimeError: x must be a sequence
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.9/site-packages/MAVProxy/modules/lib/wxhorizon_ui.py", line 627, in on_timer
    self.updateAltHistory()
  File "/opt/homebrew/lib/python3.9/site-packages/MAVProxy/modules/lib/wxhorizon_ui.py", line 518, in updateAltHistory
    self.altMarker.set_data([self.leftPos+(self.vertSize/10.0)+0.5,val])
  File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/lines.py", line 665, in set_data
    self.set_xdata(x)
  File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/lines.py", line 1289, in set_xdata
    raise RuntimeError('x must be a sequence')
RuntimeError: x must be a sequence

@peterbarker peterbarker merged commit 50f302c into ArduPilot:master Dec 2, 2024
2 checks passed
@peterbarker
Copy link
Contributor

Merged, thanks!

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.

2 participants