* Added an error message

* Now using .dll from system path.
This commit is contained in:
Christian Sueltrop 2013-10-21 09:45:52 +02:00
parent a04155be8c
commit 358a871493
3 changed files with 133 additions and 131 deletions

View file

@ -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

View file

@ -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.