-
Notifications
You must be signed in to change notification settings - Fork 655
Closed
Labels
Description
Describe the bug
One hour difference in timestamp between pcan and vector dongle.
The vector dongle returns correct timestamp.
pcan timestamp: 1683809683.251153
vector timestamp: 1683806083.2688096
To Reproduce
make two Bus interfaces, one with vector VN1610 and other one with Peak PCAN-USB FD
Expected behavior
Correct timestamp from the pcan dongle
Additional context
OS and version: Windows 10
Python version: 3.10.8
python-can version: 4.1.0
uptime: 3.0.1
python-can interface/s (if applicable): Vector VN1610, Peak PCAN-USB FD
PCANBasic.dll : 4.6.0.600
Traceback and logs
import can
from pprint import pprint
def test_pcan():
bus = can.interface.Bus(
bustype='pcan',
channel='PCAN_USBBUS1',
fd=True,
f_clock_mhz=80,
nom_brp=1,
nom_tseg1=127,
nom_tseg2=32,
nom_sjw=40,
data_brp=1,
data_tseg1=9,
data_tseg2=6,
data_sjw=4)
msg = bus.recv(timeout=5)
print(f"pcan timestamp: {msg.timestamp}")
def test_vector():
bus = can.interface.Bus(
bustype='vector',
channel=0,
fd=True,
bitrate=500_000,
data_bitrate=5_000_000,
sjw_abr=32,
tseg1_abr=127,
tseg2_abr=32,
sjw_dbr=6,
tseg1_dbr=9,
tseg2_dbr=6)
msg = bus.recv(timeout=5)
print(f"vector timestamp: {msg.timestamp}")
test_pcan()
test_vector()