* Added an error message
* Now using .dll from system path.
This commit is contained in:
parent
a04155be8c
commit
358a871493
3 changed files with 133 additions and 131 deletions
|
|
@ -120,6 +120,7 @@ class PcanAdapter (object):
|
||||||
if self.Messages[msgKey].Id == msg.ID:
|
if self.Messages[msgKey].Id == msg.ID:
|
||||||
if msg.LEN != self.Messages[msgKey].Length:
|
if msg.LEN != self.Messages[msgKey].Length:
|
||||||
# an error message could be posted at this point
|
# an error message could be posted at this point
|
||||||
|
print 'ERROR: Message ID %s received, but length does not match definition.' % (hex(msg.ID))
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
#print msgKey
|
#print msgKey
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,8 @@ class PCANBasic:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Loads the PCANBasic.dll
|
# Loads the PCANBasic.dll
|
||||||
#
|
#
|
||||||
self.__m_dllBasic = windll.LoadLibrary("../PCANBasic/PCANBasic")
|
#self.__m_dllBasic = windll.LoadLibrary("../PCANBasic/PCANBasic")
|
||||||
|
self.__m_dllBasic = windll.LoadLibrary('PCANBasic')
|
||||||
if self.__m_dllBasic == None:
|
if self.__m_dllBasic == None:
|
||||||
print "Exception: The PCAN-Basic DLL couldn't be loaded!"
|
print "Exception: The PCAN-Basic DLL couldn't be loaded!"
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue