Permalink
Browse files

jack simu

  • Loading branch information...
1 parent 46d05d3 commit 829b0e1235a803f9120317db9c0ccb82694a3ed1 Cedric Bache committed May 16, 2012
Showing with 7 additions and 1 deletion.
  1. +1 −1 lib/py3irc/mypyirc/ircdefine.py
  2. +1 −0 simu/simu/define.py
  3. +5 −0 simu/simu/objects/robot.py
@@ -31,7 +31,7 @@
ID_MSG_POS = 101
ID_MSG_HOKUYO = 102
-ID_MSG_JACK = 102
+ID_MSG_JACK = 103
ID_MSG_US = 104 # ultra son
BLUE = 0
View
@@ -42,6 +42,7 @@
KEY_BULDO = K_x # mode buldozer
KEY_TELEPORTATION = K_t # mode téléportation
KEY_RECUL = K_r # mode marche arrière
+KEY_JACK = K_j # jack
BIG = 0
@@ -105,6 +105,8 @@ def __init__(self, *, engine, canal_asserv, canal_others, canal_visio, canal_ext
self.transform("extras", canal_extras)
self.body._set_velocity_func(self._my_velocity_func())
+
+ self.state_jack = 0 # jack in
def init(self, engine):
self.engine = engine
@@ -322,6 +324,9 @@ def onEvent(self, event):
return True
elif KEY_RECUL == event.key:
self.mod_recul = not self.mod_recul
+ elif KEY_JACK == event.key:
+ self.state_jack = 0 if self.state_jack else 1
+ self.send_canal_others(ID_MSG_JACK, self.state_jack)
elif KEYUP == event.type:
if KEY_CHANGE_TEAM == event.key:
print("équipe bleu")

0 comments on commit 829b0e1

Please sign in to comment.