|
@@ -1,4 +1,4 @@
|
|
|
-#! /usr/bin/python3.5
|
|
|
+#! /usr/bin/env python3.5
|
|
|
# Copyright 2017 Digital
|
|
|
#
|
|
|
# This file is part of BeeWatch.
|
|
@@ -60,6 +60,11 @@ class BeeAPI(object):
|
|
|
super(BeeAPI, self).__init__()
|
|
|
lapi.info("BeeAPI")
|
|
|
self.pin_api = beewatch.pinapi.PinAPIBee()
|
|
|
+ self.text_to_func = {
|
|
|
+ "turn_left":self.pin_api.turn_left,
|
|
|
+ "turn_left":self.pin_api.turn_right,
|
|
|
+ "turn":self.pin_api.turn,
|
|
|
+ }
|
|
|
def turn_left(self,respond_method):
|
|
|
self.pin_api.turn_left()
|
|
|
respond_method("heyooo")
|
|
@@ -75,9 +80,11 @@ class BeeAPI(object):
|
|
|
respond_method("doing three things at once")
|
|
|
def log(self,*args):
|
|
|
lapi.debug(args)
|
|
|
- text_to_func = {
|
|
|
- "turn_left":turn_left,
|
|
|
- }
|
|
|
+ # text_to_func = {
|
|
|
+ # "turn_left":turn_left,
|
|
|
+ # "turn_left":turn_right,
|
|
|
+ # "turn":turn,
|
|
|
+ # }
|
|
|
|
|
|
class ConnHandlerBeeWatch(digilib.network.ConnHandlerBase):
|
|
|
def __init__(self, socket, addr, server, bee_api=None):
|