Skip to content

Commit

Permalink
Improve calculate_time func
Browse files Browse the repository at this point in the history
  • Loading branch information
microdog committed Dec 31, 2017
1 parent 1bc5c3e commit 68d72c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
@@ -127,7 +127,7 @@ def calculate_distance(image, template, scale):

def calculate_time(distance, image, scale):
"""Map distance to time in ms."""
return int(1.01 * distance / scale)
return int(1.0 * distance / scale * 1440 / piece_template_screen_width)


@app.route('/', methods=['POST'])

0 comments on commit 68d72c5

Please sign in to comment.