Open fatuhoku opened 11 years ago
There is just not enough info here to even begin debugging any potential issue. Do you have permissions to open the port? Have you actually opened the port? Is it at the right baud?
Okay, I've updated the issue description and title.
I have opened the port. The console lines displayed are:
PyPose starting...
./PyPose.py:412: wxPyDeprecationWarning: Using deprecated class PySimpleApp.
app = wx.PySimpleApp()
Opening port: /dev/tty.usbserial-A900gcof
I've added some debug lines to see what's going on with the parsing. The functionality of the original code is unchanged:
# in ArbotixTerminal.py
...
if keycode == wx.WXK_RETURN:
# process the command!
lastPos = self.GetLastPosition()
positions = self.PositionToXY(lastPos)
line = positions[1]
print "self.GetLastPosition(): " + repr(lastPos)
print "self.PositionToXY(lastPos): " + repr(positions)
print "position: " + repr(line)
text = self.GetLineText(line)
print "text: " + repr(text)
l = text[3:].split(" ")
print "line: " + repr(l)
try:
...
The console lines now read:
PyPose starting...
./PyPose.py:412: wxPyDeprecationWarning: Using deprecated class PySimpleApp.
app = wx.PySimpleApp()
Opening port: /dev/tty.usbserial-A900gcof
self.GetLastPosition(): 28
self.PositionToXY(lastPos): (8191, 4409303785)
position: 4409303785
text: u''
line: [u'']
I put this down to PositionToXY()
not functioning correctly. I have tried again with wxPython2.9-osx-cocoa-py2.7.pkg
and a similar problem occurs.
I'm using PyPose on a Mac, and the terminal does not function correctly. It
Reproduction:
config
andport
; select the USB port for the ArbotiX controller (for me, this is/dev/tty.usbserial-A900gcf
)Example
(none of the things you type are interpreted as commands.)
I'm using Mac OSX Mountain Lion (10.8) with Homebrew-installed Python, and using wxPython
2.9.4.0
provided by thewxmac
Homebrew package. I think it has to do with how lines are grabbed fromwx
. I'm not Pythonista but when I try toprintln
out the commands it parsed from theTextCtrl
, all I get are numbers. No wonder it can't recognise any commands. What's more curious is that no error is thrown.