Skip to content

Commit

Permalink
make sure set min/max values are int, newer python errors with 'TypeE…
Browse files Browse the repository at this point in the history
…rror: setMaximum(self, int): argument 1 has unexpected type 'float''
  • Loading branch information
lucasw committed May 17, 2022
1 parent 1fe18c6 commit 81e72a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rqt_robot_steering/robot_steering.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,19 +229,19 @@ def _on_decrease_z_angular_pressed(self):

def _on_max_x_linear_changed(self, value):
self._widget.x_linear_slider.setMaximum(
value * RobotSteering.slider_factor)
int(value * RobotSteering.slider_factor))

def _on_min_x_linear_changed(self, value):
self._widget.x_linear_slider.setMinimum(
value * RobotSteering.slider_factor)
int(value * RobotSteering.slider_factor))

def _on_max_z_angular_changed(self, value):
self._widget.z_angular_slider.setMaximum(
value * RobotSteering.slider_factor)
int(value * RobotSteering.slider_factor))

def _on_min_z_angular_changed(self, value):
self._widget.z_angular_slider.setMinimum(
value * RobotSteering.slider_factor)
int(value * RobotSteering.slider_factor))

def _on_strong_increase_x_linear_pressed(self):
self._widget.x_linear_slider.setValue(
Expand Down

0 comments on commit 81e72a1

Please sign in to comment.