-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timestamp pcan incorrect, vector correct #1589
Comments
You probably need the |
Hi, Thank you for your fast response. python -m venv env
.\env\Scripts\Activate.ps1
pip install python-can[pcan]
pip list
Package Version
----------------- -------
packaging 23.1
pip 22.2.2
python-can 4.2.0
pywin32 306
setuptools 63.2.0
typing_extensions 4.5.0
uptime 3.0.1
wrapt 1.15.0 I ran the code again and there is still an hour difference in the timestamp of the pcan dongle. pcan timestamp: 1683875166.8466148 |
hey @skipper85 we're encountering a similar problem, did you eventually fix it? |
hello @simeon-s1 , I did not fix it yet, still need to dive into it. |
try #1651 |
Hello @zariiii9003 , Thank you for the pull request. After installing with python -m venv env
git clone https://github.com/zariiii9003/python-can.git
git switch pcan_timestamp
cd python-can
python -m pip install --user pipx
python -m pipx run build
python -m pipx run twine check dist/*
..\env\Scripts\Activate.ps1
python -m pip install -e .
python -m pip install uptime the timestamp is ok. import can
import time
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}")
print(f"timestamp: {time.time()}")
test_pcan() pcan timestamp : 1694172746.938586 |
Thanks for the feedback |
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
The text was updated successfully, but these errors were encountered: