From 89af4f91bed8e57413abae9423e5bd336c83b8f7 Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Wed, 22 Feb 2017 15:46:33 +0100 Subject: [PATCH] Script execution --- script/local.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/script/local.py b/script/local.py index 22687aa..e9876ce 100644 --- a/script/local.py +++ b/script/local.py @@ -70,6 +70,16 @@ class RobotTCP(TcpDevice): def get_int(self): return int(self.get_var("n")) + def get_float(self): + return float(self.get_var("n")) + + def get_int_arr(self): + return [int(x) for x in self.get_arr("arr")] + + def get_float_arr(self): + return [float(x) for x in self.get_arr("arr")] + + def eval_int(self, cmd): ret = self.execute('eval', "n=" + cmd) if ret.strip() != "":