Skip to content

Commit

Permalink
Fixed VESC slider rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
Ultrawipf committed Jan 9, 2023
1 parent 4922afe commit a951aed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vesc_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def torqueCb(self,v):
def posCb(self,v):
vesc_encoder_position = ( 360 * v ) / 1000000000
self.label_pos.setText("{:.2f}".format(vesc_encoder_position))
self.horizontalSlider_pos.setValue(vesc_encoder_position)
self.horizontalSlider_pos.setValue(int(round(vesc_encoder_position)))

def errorCb(self,dat):
txt = "Ok"
Expand Down

0 comments on commit a951aed

Please sign in to comment.