Skip to content

Commit 85cf8a9

Browse files
authored
Fixing Implicit Type Casting (UBC-Thunderbots#3363)
* hopefully this fixes it? * found another spot
1 parent 327c969 commit 85cf8a9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/software/thunderscope/common/common_widgets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def setValue(self, value: float) -> None:
145145
146146
:param value: the float value to set
147147
"""
148-
super(ColorProgressBar, self).setValue(value * self.decimals)
148+
super(ColorProgressBar, self).setValue(int(value * self.decimals))
149149

150150
# clamp percent to make sure it's between 0% and 100%
151151
percent = self.getPercentage()

src/software/thunderscope/robot_diagnostics/chicker_widget.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def send_command_and_timeout(self, command: ChickerCommandMode) -> None:
122122
self.disable_kick_chip_buttons()
123123

124124
# set and start timer to re-enable buttons after 3 seconds
125-
QTimer.singleShot(CHICKER_TIMEOUT, self.enable_kick_chip_buttons)
125+
QTimer.singleShot(int(CHICKER_TIMEOUT), self.enable_kick_chip_buttons)
126126

127127
def disable_kick_chip_buttons(self) -> None:
128128
"""Disables the buttons"""

src/software/thunderscope/robot_diagnostics/robot_info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def update(self, robot_status: RobotStatus, round_trip_time: RobotStatistic):
307307

308308
self.__update_ui(robot_status, round_trip_time)
309309

310-
QtCore.QTimer.singleShot(DISCONNECT_DURATION_MS, self.disconnect_robot)
310+
QtCore.QTimer.singleShot(int(DISCONNECT_DURATION_MS), self.disconnect_robot)
311311

312312
def disconnect_robot(self) -> None:
313313
"""Calculates the time between the last robot status and now

0 commit comments

Comments
 (0)