From 48e509336acdda1bb0a449c00bc7a8918fb9df85 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sun, 11 Oct 2009 20:16:31 +0200 Subject: host, digital/io/tools, digital/asserv/tools: notify observers on register --- host/simu/robots/aquajim/view/arm.py | 1 - host/simu/robots/aquajim/view/bridge.py | 1 - host/simu/robots/aquajim/view/elevator.py | 2 -- host/simu/robots/aquajim/view/robot.py | 1 - 4 files changed, 5 deletions(-) (limited to 'host/simu/robots/aquajim/view') diff --git a/host/simu/robots/aquajim/view/arm.py b/host/simu/robots/aquajim/view/arm.py index aab69c58..c2f2169b 100644 --- a/host/simu/robots/aquajim/view/arm.py +++ b/host/simu/robots/aquajim/view/arm.py @@ -36,7 +36,6 @@ class Arm (Drawable): Drawable.__init__ (self, onto) self.model = model self.model.register (self.__notified) - self.__notified () def __notified (self): self.angle = self.model.arm_angle diff --git a/host/simu/robots/aquajim/view/bridge.py b/host/simu/robots/aquajim/view/bridge.py index 59c86211..d5400c0f 100644 --- a/host/simu/robots/aquajim/view/bridge.py +++ b/host/simu/robots/aquajim/view/bridge.py @@ -36,7 +36,6 @@ class Bridge (Drawable): Drawable.__init__ (self, onto) self.model = model self.model.register (self.update) - self.update () def draw (self): self.reset () diff --git a/host/simu/robots/aquajim/view/elevator.py b/host/simu/robots/aquajim/view/elevator.py index 7c27d4d3..7dbcf477 100644 --- a/host/simu/robots/aquajim/view/elevator.py +++ b/host/simu/robots/aquajim/view/elevator.py @@ -35,10 +35,8 @@ class Elevator (Drawable): Drawable.__init__ (self, onto) self.model = model self.model.register (self.__notified) - self.__notified () self.door_model = model.elevator_door self.door_model.register (self.__door_notified) - self.__door_notified () def __notified (self): self.height = self.model.elevator_height diff --git a/host/simu/robots/aquajim/view/robot.py b/host/simu/robots/aquajim/view/robot.py index 713a30c4..ad613bba 100644 --- a/host/simu/robots/aquajim/view/robot.py +++ b/host/simu/robots/aquajim/view/robot.py @@ -31,7 +31,6 @@ class Robot (simu.inter.drawable.Drawable): simu.inter.drawable.Drawable.__init__ (self, onto) self.position_model = position_model self.position_model.register (self.__position_notified) - self.__position_notified () def __position_notified (self): """Called on position modifications.""" -- cgit v1.2.3