Skip to content

actuator panel: fix type errors - #135

Merged
joshanne merged 1 commit into
dronecan:masterfrom
ZeroJet-Software:master
Jul 24, 2026
Merged

actuator panel: fix type errors#135
joshanne merged 1 commit into
dronecan:masterfrom
ZeroJet-Software:master

Conversation

@kand198

@kand198 kand198 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

This PR fixes two type errors in the actuator panel.

Bugs caused by these errors:

  • Changes to the broadcast interval input do not change the broadcast interval timer's interval value.
  • Changing command value directly in the command value spinbox does not update the corresponding command value slider component.
  • When changing the broadcast interval input, command value spinbox, or command value slider, a large number of errors are emitted, spamming the output.

Traceback samples:

Broadcast interval:

Traceback (most recent call last):
  File "C:\Users\keith.anderson\git\gui_tool\dronecan_gui_tool\panels\actuator_panel.py", line 138, in <lambda>
    lambda: self._bcast_timer.setInterval(self._bcast_interval.value() * 1e3))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: setInterval(self, msec: int): argument 1 has unexpected type 'float'

Slider:

Traceback (most recent call last):
  File "C:\Users\keith.anderson\git\gui_tool\dronecan_gui_tool\panels\actuator_panel.py", line 49, in <lambda>
    self._spinbox.valueChanged.connect(lambda: self._slider.setValue(self._spinbox.value()*1000.0))
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: setValue(self, a0: int): argument 1 has unexpected type 'float'

@joshanne joshanne left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @kand198 - I actually ran into this a few days ago too and was about to fix it! LGTM.

@joshanne
joshanne merged commit eb97333 into dronecan:master Jul 24, 2026
5 checks passed
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