From 44f55257cae560ee1e949d378504a9a457eb71c0 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Thu, 13 May 2010 02:59:20 +0200 Subject: digital/asserv, digital/io, host/simu: change gate contact position --- host/simu/robots/marcel/model/loader.py | 2 +- host/simu/robots/marcel/view/loader.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'host/simu/robots') diff --git a/host/simu/robots/marcel/model/loader.py b/host/simu/robots/marcel/model/loader.py index 79292ecd..0270ce79 100644 --- a/host/simu/robots/marcel/model/loader.py +++ b/host/simu/robots/marcel/model/loader.py @@ -36,7 +36,7 @@ class Loader (Observable): ELEVATOR_LINEAR_STROKE = 32 ELEVATOR_ROTATING_STROKE = 200 - 32 - GATE_STROKE = 3.3284 * pi + GATE_STROKE = -3.0124 * 2 * pi FRONT_ZONE_X_MIN = 120 - 15 FRONT_ZONE_X_MAX = 120 + CLAMP_LENGTH - 15 diff --git a/host/simu/robots/marcel/view/loader.py b/host/simu/robots/marcel/view/loader.py index 4ad2ffce..5bda5d5b 100644 --- a/host/simu/robots/marcel/view/loader.py +++ b/host/simu/robots/marcel/view/loader.py @@ -60,11 +60,11 @@ class Loader (Drawable): x = 0 y += 40 if self.model.gate_angle is not None: - ratio = self.model.gate_angle / self.model.GATE_STROKE + ratio = 1 - self.model.gate_angle / self.model.GATE_STROKE # Draw gate. for i in xrange (0, 4): self.draw_line ((100, 125 + 5 * i), - (300, 25 + 25 * i + (75 - 10 * i) * ratio)) + (300, 25 + 25 * i + (150 - 20 * i) * ratio)) if self.model.elevator_height is not None: self.trans_identity () self.trans_rotate (-self.model.elevator_angle) -- cgit v1.2.3