remove compiled files
This commit is contained in:
parent
d960680e2e
commit
effafdbb56
12 changed files with 82 additions and 30 deletions
46
.gitignore
vendored
Normal file
46
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Ignore-Datei selbst ausschließen
|
||||
#.gitignore
|
||||
.gitmodules
|
||||
Thumbs.db
|
||||
|
||||
# Bestimmte Dateien ausschließen
|
||||
cache.dat
|
||||
|
||||
# Es können Wildcards (*,?) verwendet werden:
|
||||
*.exe
|
||||
*.dll
|
||||
*.dsbackup
|
||||
*.avrsln
|
||||
*.avrsuo
|
||||
*.avrgccproj
|
||||
*.aps
|
||||
*.atsln
|
||||
*.atsuo
|
||||
*.cproj
|
||||
*.aws
|
||||
*.xml
|
||||
*.xslt
|
||||
*.aux
|
||||
*.dvi
|
||||
*.lof
|
||||
*.log
|
||||
*.lot
|
||||
*.out
|
||||
*.synctex.gz
|
||||
*.toc
|
||||
*.pyc
|
||||
*.patch
|
||||
*.csv
|
||||
.project
|
||||
.pydevproject
|
||||
tmp?.dat
|
||||
|
||||
# Auch Verzeichnisse kann man ausschießen:
|
||||
*default/
|
||||
*Debug/
|
||||
*bin/
|
||||
*ADC/
|
||||
*CAN/
|
||||
*UART/
|
||||
.*/
|
||||
CANLibrary/
|
||||
|
|
@ -2,5 +2,6 @@ eclipse.preferences.version=1
|
|||
encoding//CANLibrary/CanMessage.py=UTF-8
|
||||
encoding//CANLibrary/CanSignal.py=UTF-8
|
||||
encoding//CANLibrary/PCan.py=UTF-8
|
||||
encoding//CANLibrary/Sym2Lib.py=UTF-8
|
||||
encoding//CANLibrary/example.py=UTF-8
|
||||
encoding//pycrc/crc_algorithms.py=latin1
|
||||
|
|
|
|||
|
|
@ -25,12 +25,13 @@ class PcanAdapter(object):
|
|||
}
|
||||
|
||||
|
||||
def __init__(self, Baudrate):
|
||||
def __init__(self, Baudrate, debug = True):
|
||||
'''
|
||||
Constructor.
|
||||
@param Baudrate: Baud rate from the PcanAdapter. Baud rate dictionary
|
||||
'''
|
||||
# Instance variables:
|
||||
self.debug = debug
|
||||
self.Messages = {}
|
||||
self.Channel = PCANBasic.PCAN_USBBUS1
|
||||
self.Pcan = PCANBasic.PCANBasic()
|
||||
|
|
@ -71,13 +72,15 @@ class PcanAdapter(object):
|
|||
self.Pcan.Uninitialize(PCANBasic.PCAN_NONEBUS)
|
||||
status = self.Pcan.Initialize(self.Channel, self.Baudrate)
|
||||
if status != PCANBasic.PCAN_ERROR_OK:
|
||||
if self.debug:
|
||||
print 'Error: ', self.Pcan.GetErrorText(status, 0)[1]
|
||||
sys.exit("PCAN initialisation error")
|
||||
|
||||
if self.debug:
|
||||
print("PCAN initialised")
|
||||
self.isInitialised = True
|
||||
|
||||
channel, hwId = self.Pcan.GetValue( self.Channel, PCANBasic.PCAN_DEVICE_NUMBER )
|
||||
if self.debug:
|
||||
print 'DeviceNumber: ', hwId
|
||||
|
||||
def uninitialize(self):
|
||||
|
|
@ -87,9 +90,10 @@ class PcanAdapter(object):
|
|||
if self.isInitialised:
|
||||
status = self.Pcan.Uninitialize(self.Channel)
|
||||
if status != PCANBasic.PCAN_ERROR_OK:
|
||||
if self.debug:
|
||||
print 'Error: ', self.Pcan.GetErrorText(status, 0)[1]
|
||||
sys.exit("PCAN deinitialisation error")
|
||||
|
||||
if self.debug:
|
||||
print("PCAN deinitialised")
|
||||
|
||||
def sendMessage(self, Message, rtr = False):
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ Example for creating and sending CAN messages via PCAN using the CanMessage, Can
|
|||
from CanMessage import CanMessage
|
||||
from CanSignal import CanSignal
|
||||
from PCan import PcanAdapter
|
||||
from Sym2Lib import addtoPCAN, printCode
|
||||
import time
|
||||
|
||||
print '\nCreate a PCAN adapter'
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
pycrc/pycrc.pyc
BIN
pycrc/pycrc.pyc
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue