Skip to content

Commit

Permalink
#361 Cadence made integer as well
Browse files Browse the repository at this point in the history
  • Loading branch information
WouterJD committed Jan 14, 2022
1 parent 640f95b commit 31c2107
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pythoncode/usbTrainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Version info
#-------------------------------------------------------------------------------
__version__ = "2022-01-13"
# 2022-01-13 clsSimulatedTrainer.Refresh() must correct data type of variables
# otherwise CurrentPower = iPower is not integer.
# 2022-01-13 #361 clsSimulatedTrainer.Refresh() must correct data type of
# variables otherwise CurrentPower = iPower is not integer.
# 2021-11-15 "Steering axis = " commented code added for investigation
# 2021-05-18 TargetResistanceFT used in logfile (instead of TargetResistance)
# 2021-04-29 Short message warning message comment added for Raspberry
Expand Down Expand Up @@ -668,8 +668,9 @@ def Refresh(self, QuarterSecond, TacxMode):
self.CurrentPower /= self.clv.PowerFactor # Was just received

# ----------------------------------------------------------------------
# Round after all these calculations (and correct data type!)
# Round after all these calculations (and correct data type!) #361
# ----------------------------------------------------------------------
self.Cadence = int(self.Cadence)
self.TargetPower = int(self.TargetPower)
self.TargetResistance = int(self.TargetResistance)
self.CurrentResistance = int(self.CurrentResistance)
Expand Down Expand Up @@ -1051,8 +1052,9 @@ def Refresh (self, _QuarterSecond=None, _TacxMode=None):
self.VirtualSpeedKmh= self.SpeedKmh

# ----------------------------------------------------------------------
# Round after all these calculations (and correct data type!)
# Round after all these calculations (and correct data type!) #361
# ----------------------------------------------------------------------
self.Cadence = int(self.Cadence)
self.TargetPower = int(self.TargetPower)
self.TargetResistance = int(self.TargetResistance)
self.CurrentResistance = int(self.CurrentResistance)
Expand Down

0 comments on commit 31c2107

Please sign in to comment.