Skip to content

Commit cd4f155

Browse files
committed
2 parents 1e3b303 + 03af399 commit cd4f155

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pymycobot/elephantrobot.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,17 +240,20 @@ def jog_coord(self, axis_str, direction, speed):
240240

241241
def get_digital_in(self, pin_number):
242242
command = "get_digital_in(" + str(pin_number) + ")\n"
243-
self.send_command(command)
243+
res = self.send_command(command)
244+
return self.string_to_int(res)
244245

245246
def get_digital_out(self, pin_number):
246247
command = "get_digital_out(" + str(pin_number) + ")\n"
247248
print(command)
248-
self.send_command(command)
249+
res = self.send_command(command)
250+
return self.string_to_int(res)
249251

250252
def get_joint_current(self, joint_number):
251253
command = "get_joint_current(" + str(joint_number) + ")\n"
252254
print(command)
253-
self.send_command(command)
255+
res = self.send_command(command)
256+
return self.string_to_double(res)
254257

255258
def set_digital_out(self, pin_number, pin_signal):
256259
command = "set_digital_out(" + str(pin_number) + "," + str(pin_signal) + ")\n"

0 commit comments

Comments
 (0)