rewind to world before StandardTimes
This commit is contained in:
@@ -353,15 +353,15 @@ def handle_check_race_course(self,
|
||||
else:
|
||||
splitsecond = 0
|
||||
|
||||
if 'referencespeed' in kwargs:
|
||||
referencespeed = kwargs['referencespeed']
|
||||
else:
|
||||
referencespeed = 5.0
|
||||
# if 'referencespeed' in kwargs:
|
||||
# referencespeed = kwargs['referencespeed']
|
||||
# else:
|
||||
# referencespeed = 5.0
|
||||
|
||||
if 'coursedistance' in kwargs:
|
||||
coursedistance = kwargs['coursedistance']
|
||||
else:
|
||||
coursedistance = 0
|
||||
# if 'coursedistance' in kwargs:
|
||||
# coursedistance = kwargs['coursedistance']
|
||||
# else:
|
||||
# coursedistance = 0
|
||||
|
||||
mode = 'race'
|
||||
if 'mode' in kwargs:
|
||||
@@ -489,28 +489,30 @@ def handle_check_race_course(self,
|
||||
else:
|
||||
coursecompleted = False
|
||||
|
||||
points = 0
|
||||
# points = 0
|
||||
if coursecompleted:
|
||||
if coursedistance == 0:
|
||||
coursedistance = coursemeters
|
||||
velo = coursedistance/coursetimeseconds
|
||||
points = int(100*(2.-referencespeed/velo))
|
||||
query = 'UPDATE rowers_virtualraceresult SET coursecompleted = 1, duration = "{duration}", distance = {distance}, workoutid = {workoutid}, startsecond = {startsecond}, endsecond = {endsecond}, points={points} WHERE id={recordid}'.format(
|
||||
# if coursedistance == 0:
|
||||
# coursedistance = coursemeters
|
||||
# velo = coursedistance/coursetimeseconds
|
||||
# points = int(100*(2.-referencespeed/velo))
|
||||
# query = 'UPDATE rowers_virtualraceresult SET coursecompleted = 1, duration = "{duration}", distance = {distance}, workoutid = {workoutid}, startsecond = {startsecond}, endsecond = {endsecond}, points={points} WHERE id={recordid}'.format(
|
||||
query = 'UPDATE rowers_virtualraceresult SET coursecompleted = 1, duration = "{duration}", distance = {distance}, workoutid = {workoutid}, startsecond = {startsecond}, endsecond = {endsecond} WHERE id={recordid}'.format(
|
||||
recordid=recordid,
|
||||
duration=totaltime_sec_to_string(coursetimeseconds),
|
||||
distance=int(coursemeters),
|
||||
points=points,
|
||||
# points=points,
|
||||
workoutid=workoutid,
|
||||
startsecond=startsecond,
|
||||
endsecond=endsecond,
|
||||
)
|
||||
|
||||
if mode == 'coursetest':
|
||||
query = 'UPDATE rowers_coursetestresult SET coursecompleted = 1, duration = "{duration}", distance = {distance}, workoutid = {workoutid}, startsecond = {startsecond}, endsecond = {endsecond}, points={points} WHERE id={recordid}'.format(
|
||||
# query = 'UPDATE rowers_coursetestresult SET coursecompleted = 1, duration = "{duration}", distance = {distance}, workoutid = {workoutid}, startsecond = {startsecond}, endsecond = {endsecond}, points={points} WHERE id={recordid}'.format(
|
||||
query = 'UPDATE rowers_coursetestresult SET coursecompleted = 1, duration = "{duration}", distance = {distance}, workoutid = {workoutid}, startsecond = {startsecond}, endsecond = {endsecond} WHERE id={recordid}'.format(
|
||||
recordid=recordid,
|
||||
duration=totaltime_sec_to_string(coursetimeseconds),
|
||||
distance=int(coursemeters),
|
||||
points=points,
|
||||
# points=points,
|
||||
workoutid=workoutid,
|
||||
startsecond=startsecond,
|
||||
endsecond=endsecond,
|
||||
|
||||
Reference in New Issue
Block a user