Skip to content

Commit 570ddbb

Browse files
committed
Make sure spaces are used for indentation and remove whitespaces
1 parent 435ac1b commit 570ddbb

1 file changed

Lines changed: 38 additions & 38 deletions

File tree

can/interfaces/pcan/basic.py

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
PCAN_LANBUS15 = TPCANHandle(0x80F) # PCAN-LAN interface, channel 15
109109
PCAN_LANBUS16 = TPCANHandle(0x810) # PCAN-LAN interface, channel 16
110110

111-
# Represent the PCAN error and status codes
111+
# Represent the PCAN error and status codes
112112
PCAN_ERROR_OK = TPCANStatus(0x00000) # No error
113113
PCAN_ERROR_XMTFULL = TPCANStatus(0x00001) # Transmit buffer in CAN controller is full
114114
PCAN_ERROR_OVERRUN = TPCANStatus(0x00002) # CAN controller was read too late
@@ -239,7 +239,7 @@
239239

240240
# Baud rate codes = BTR0/BTR1 register values for the CAN controller.
241241
# You can define your own Baud rate with the BTROBTR1 register.
242-
# Take a look at www.peak-system.com for our free software "BAUDTOOL"
242+
# Take a look at www.peak-system.com for our free software "BAUDTOOL"
243243
# to calculate the BTROBTR1 register for every bit rate and sample point.
244244

245245
PCAN_BAUD_1M = TPCANBaudrate(0x0014) # 1 MBit/s
@@ -260,7 +260,7 @@
260260
# Represents the configuration for a CAN bit rate
261261
# Note:
262262
# * Each parameter and its value must be separated with a '='.
263-
# * Each pair of parameter/value must be separated using ','.
263+
# * Each pair of parameter/value must be separated using ','.
264264
#
265265
# Example:
266266
# f_clock=80000000,nom_brp=10,nom_tseg1=5,nom_tseg2=2,nom_sjw=1,data_brp=4,data_tseg1=7,data_tseg2=2,data_sjw=1
@@ -353,7 +353,7 @@ def Initialize(
353353
HwType : NON PLUG&PLAY: The type of hardware and operation mode
354354
IOPort : NON PLUG&PLAY: The I/O address for the parallel port
355355
Interrupt: NON PLUG&PLAY: Interrupt number of the parallel port
356-
356+
357357
Returns:
358358
A TPCANStatus error code
359359
"""
@@ -370,7 +370,7 @@ def InitializeFD(
370370
BitrateFD):
371371

372372
"""
373-
Initializes a FD capable PCAN Channel
373+
Initializes a FD capable PCAN Channel
374374
375375
Parameters:
376376
Channel : The handle of a FD capable PCAN Channel
@@ -403,13 +403,13 @@ def Uninitialize(
403403

404404
"""
405405
Uninitializes one or all PCAN Channels initialized by CAN_Initialize
406-
406+
407407
Remarks:
408408
Giving the TPCANHandle value "PCAN_NONEBUS", uninitialize all initialized channels
409-
409+
410410
Parameters:
411411
Channel : A TPCANHandle representing a PCAN Channel
412-
412+
413413
Returns:
414414
A TPCANStatus error code
415415
"""
@@ -426,13 +426,13 @@ def Reset(
426426

427427
"""
428428
Resets the receive and transmit queues of the PCAN Channel
429-
429+
430430
Remarks:
431431
A reset of the CAN controller is not performed
432-
432+
433433
Parameters:
434434
Channel : A TPCANHandle representing a PCAN Channel
435-
435+
436436
Returns:
437437
A TPCANStatus error code
438438
"""
@@ -449,10 +449,10 @@ def GetStatus(
449449

450450
"""
451451
Gets the current status of a PCAN Channel
452-
452+
453453
Parameters:
454454
Channel : A TPCANHandle representing a PCAN Channel
455-
455+
456456
Returns:
457457
A TPCANStatus error code
458458
"""
@@ -471,16 +471,16 @@ def Read(
471471
Reads a CAN message from the receive queue of a PCAN Channel
472472
473473
Remarks:
474-
The return value of this method is a 3-touple, where
474+
The return value of this method is a 3-touple, where
475475
the first value is the result (TPCANStatus) of the method.
476476
The order of the values are:
477477
[0]: A TPCANStatus error code
478478
[1]: A TPCANMsg structure with the CAN message read
479479
[2]: A TPCANTimestamp structure with the time when a message was read
480-
480+
481481
Parameters:
482482
Channel : A TPCANHandle representing a PCAN Channel
483-
483+
484484
Returns:
485485
A touple with three values
486486
"""
@@ -501,16 +501,16 @@ def ReadFD(
501501
Reads a CAN message from the receive queue of a FD capable PCAN Channel
502502
503503
Remarks:
504-
The return value of this method is a 3-touple, where
504+
The return value of this method is a 3-touple, where
505505
the first value is the result (TPCANStatus) of the method.
506506
The order of the values are:
507507
[0]: A TPCANStatus error code
508508
[1]: A TPCANMsgFD structure with the CAN message read
509509
[2]: A TPCANTimestampFD that is the time when a message was read
510-
510+
511511
Parameters:
512512
Channel : The handle of a FD capable PCAN Channel
513-
513+
514514
Returns:
515515
A touple with three values
516516
"""
@@ -529,12 +529,12 @@ def Write(
529529
MessageBuffer):
530530

531531
"""
532-
Transmits a CAN message
533-
532+
Transmits a CAN message
533+
534534
Parameters:
535535
Channel : A TPCANHandle representing a PCAN Channel
536536
MessageBuffer: A TPCANMsg representing the CAN message to be sent
537-
537+
538538
Returns:
539539
A TPCANStatus error code
540540
"""
@@ -551,12 +551,12 @@ def WriteFD(
551551
MessageBuffer):
552552

553553
"""
554-
Transmits a CAN message over a FD capable PCAN Channel
555-
554+
Transmits a CAN message over a FD capable PCAN Channel
555+
556556
Parameters:
557557
Channel : The handle of a FD capable PCAN Channel
558558
MessageBuffer: A TPCANMsgFD buffer with the message to be sent
559-
559+
560560
Returns:
561561
A TPCANStatus error code
562562
"""
@@ -580,14 +580,14 @@ def FilterMessages(
580580
Remarks:
581581
The message filter will be expanded with every call to this function.
582582
If it is desired to reset the filter, please use the 'SetValue' function.
583-
583+
584584
Parameters:
585585
Channel : A TPCANHandle representing a PCAN Channel
586586
FromID : A c_uint value with the lowest CAN ID to be received
587587
ToID : A c_uint value with the highest CAN ID to be received
588-
Mode : A TPCANMode representing the message type (Standard, 11-bit
588+
Mode : A TPCANMode representing the message type (Standard, 11-bit
589589
identifier, or Extended, 29-bit identifier)
590-
590+
591591
Returns:
592592
A TPCANStatus error code
593593
"""
@@ -610,15 +610,15 @@ def GetValue(
610610
Parameters can be present or not according with the kind
611611
of Hardware (PCAN Channel) being used. If a parameter is not available,
612612
a PCAN_ERROR_ILLPARAMTYPE error will be returned.
613-
614-
The return value of this method is a 2-touple, where
613+
614+
The return value of this method is a 2-touple, where
615615
the first value is the result (TPCANStatus) of the method and
616-
the second one, the asked value
617-
616+
the second one, the asked value
617+
618618
Parameters:
619619
Channel : A TPCANHandle representing a PCAN Channel
620620
Parameter : The TPCANParameter parameter to get
621-
621+
622622
Returns:
623623
A touple with 2 values
624624
"""
@@ -648,13 +648,13 @@ def SetValue(
648648
Parameters can be present or not according with the kind
649649
of Hardware (PCAN Channel) being used. If a parameter is not available,
650650
a PCAN_ERROR_ILLPARAMTYPE error will be returned.
651-
651+
652652
Parameters:
653653
Channel : A TPCANHandle representing a PCAN Channel
654654
Parameter : The TPCANParameter parameter to set
655655
Buffer : Buffer with the value to be set
656656
BufferLength : Size in bytes of the buffer
657-
657+
658658
Returns:
659659
A TPCANStatus error code
660660
"""
@@ -683,16 +683,16 @@ def GetErrorText(
683683
684684
The current languages available for translation are:
685685
Neutral (0x00), German (0x07), English (0x09), Spanish (0x0A),
686-
Italian (0x10) and French (0x0C)
686+
Italian (0x10) and French (0x0C)
687687
688688
The return value of this method is a 2-touple, where
689689
the first value is the result (TPCANStatus) of the method and
690690
the second one, the error text
691-
691+
692692
Parameters:
693693
Error : A TPCANStatus error code
694694
Language : Indicates a 'Primary language ID' (Default is Neutral(0))
695-
695+
696696
Returns:
697697
A touple with 2 values
698698
"""

0 commit comments

Comments
 (0)