Commit 3b86770b authored by Luca Cristaldi's avatar Luca Cristaldi

fix calback registration

parent e5687a91
......@@ -13,7 +13,7 @@ class ModelRocket:
def send(self,stage):
self.socket.send("%d %d" % (self.topic, self.stage_map[stage]))
def __init__(self,addr="localhos:5556"):
def __init__(self,addr="localhost:5556"):
context = zmq.Context()
self.socket = context.socket(zmq.PUB)
self.socket.bind("tcp://%s" % addr)
......@@ -21,7 +21,7 @@ class ModelRocket:
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='')
parser.add_argument('addr', type=str, default="localhos:5556", nargs="?")
parser.add_argument('addr', type=str, default="localhost:5556", nargs="?")
args = parser.parse_args()
conn = krpc.connect()
......@@ -29,7 +29,7 @@ if __name__ == "__main__":
control = vessel.control
rocket = ModelRocket(args.addr)
stage = conn.add_stream(getattr, control.current_stage, 'stage')
stage = conn.add_stream(getattr, control, 'current_stage')
stage.add_callback(rocket.send)
stage.start()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment