diff --git a/script/local.py b/script/local.py index 5cfa75f..7149757 100644 --- a/script/local.py +++ b/script/local.py @@ -67,6 +67,9 @@ class RobotTCP(TcpDevice): def get_arr(self, name, size): return self.execute('get_arr', name, size) + def get_bool(self, name): + return True if (self.execute('get_bool', name).strip() == '1') else False + def get_int(self): return int(self.get_var("n")) @@ -99,7 +102,12 @@ class RobotTCP(TcpDevice): def eval_float(self, cmd): ret = self.execute('eval', "n=" + cmd) if ret.strip() != "": raise Exception(ret) - return self.get_get_float() + return self.get_float() + + def eval_bool(self, cmd): + ret = self.execute('eval', "b=" + cmd) + if ret.strip() != "": raise Exception(ret) + return self.get_bool() def get_move_id(self):