diff --git a/script/local.py b/script/local.py index e9876ce..776f5d7 100644 --- a/script/local.py +++ b/script/local.py @@ -73,11 +73,22 @@ class RobotTCP(TcpDevice): 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_int_arr(self, size): + # not working. A Jython bug in PyUnicaode? + #return [int(x) for x in self.get_arr("arr", size)] + ret = [] + a=self.get_arr("arr", size) + for i in range(size): + ret.append(int(a[i])) + return ret - def get_float_arr(self): - return [float(x) for x in self.get_arr("arr")] + def get_float_arr(self, size): + #return [float(x) for x in self.get_arr("arr", size)] + ret = [] + a=self.get_arr("arr", size) + for i in range(size): + ret.append(int(a[i])) + return ret def eval_int(self, cmd):