From: <jb...@us...> - 2010-10-05 09:04:50
|
Revision: 645 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=645&view=rev Author: jblance Date: 2010-10-05 09:04:44 +0000 (Tue, 05 Oct 2010) Log Message: ----------- Fix pace by lap to check max pace setting Modified Paths: -------------- pytrainer/trunk/pytrainer/lib/activity.py pytrainer/trunk/pytrainer/main.py Modified: pytrainer/trunk/pytrainer/lib/activity.py =================================================================== --- pytrainer/trunk/pytrainer/lib/activity.py 2010-10-05 04:00:20 UTC (rev 644) +++ pytrainer/trunk/pytrainer/lib/activity.py 2010-10-05 09:04:44 UTC (rev 645) @@ -237,6 +237,9 @@ time = float( lap['elapsed_time'].decode('utf-8') ) # time in sql is a unicode string dist = lap['distance']/1000 #distance in km pace = time/(60*dist) #min/km + if self.pace_limit is not None and pace > self.pace_limit: + logging.debug("Pace (%s) exceeds limit (%s). Setting to 0" % (str(pace), str(self.pace_limit))) + pace = 0 logging.debug("Time: %f, Dist: %f, Pace: %f" % (time, dist, pace) ) self.lap_time.addBars(x=time, y=10) if self.us_system: Modified: pytrainer/trunk/pytrainer/main.py =================================================================== --- pytrainer/trunk/pytrainer/main.py 2010-10-05 04:00:20 UTC (rev 644) +++ pytrainer/trunk/pytrainer/main.py 2010-10-05 09:04:44 UTC (rev 645) @@ -49,7 +49,7 @@ class pyTrainer: def __init__(self,filename = None, data_path = None): #Version constants - self.version ="1.7.2_svn#644" + self.version ="1.7.2_svn#645" self.DB_version = 4 #Process command line options self.startup_options = self.get_options() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |