Giter VIP home page Giter VIP logo

can4python's People

Contributors

klaselmby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

can4python's Issues

get signalvalue very slow

Hi,

Currently I have a project where I go thru large BLF files using python-can then parse each frame with kcd database from can4python. One database / can channel. For each frame i'm extracting the definition for each signal i fetch the signalvalue and store to a file all the values that changed form previous frame.
For my example blf file ~88mb it takes me around 1400seconds to run thru. At about 10miljon measurmentpoints.

python-can needs informed opinions on bcm

Hi fellow CAN Python project! Over at python-can#80 we're discussing a nicer api for transmitting periodic messages for lots of can backends (not just socketcan). What we have so far is based on socketcan's broadcast manager - which I see you have used too.

In any case I wondered if you'd be interested in adding your 2 cents?

Cheers!

Cyclic reception with bcm socket

As far as I can understand the bcm sockets are useful to handle cyclic reception on the Kernel level and thus avoid any additional overhead from doing that from code.
Is cyclic reception not possible with the current can4python library,
I've only found this possibility for sending with bcm sockets.

64 bits signals are corrupted

64 bits signals like do not work as the signal sent will be truncated. For example, 0x0102030405060708
becomes 0x0102030405060700.
Message 0xFFFFFFFFFFFFFFFF even creates an assertion error: "Trying to set too large signal value to frame"

Issue is located in canframe.py
scaled_value = float((physical_value - signaldefinition.valueoffset) / signaldefinition.scalingfactor)
Converting a 64 bit int (physical value) to float creates a rounding issue that is clearly seen when offset=0 and scalingfactor=1

Proposal is to use Decimal lib to fix it (see patch attached)

Provided also a small Python test file + kcd to highlight the issue

Other information
Tested on ubuntu 17.04 with can4python 0.2.1 and Python 3.5.3 with both vcan and real can (Microchip USB device)
Ran make test without any error

64bits_floatbug.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.