Code Monkey home page Code Monkey logo

canbeddual_arduino_lib's People

Stargazers

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

Watchers

 avatar  avatar  avatar

canbeddual_arduino_lib's Issues

The read will always request 8 bytes of data even if there are only 2 bytes in the canbus messages

The read will always request 8 bytes of data even if there are only 2 bytes in the canbus messages.
This completely messes up the read comunication after a 2 byte data data package
it is like this

if(dtaLen <= 32)
    {
        CANI2C.beginTransmission(0x41);
        CANI2C.write(canNum ? 0x17 : 0x07);
        CANI2C.endTransmission();

        CANI2C.requestFrom(0x41, 8);

        for(int i=0; i<8; i++)
        {
            str[i]= CANI2C.read();
        }
    }

and it needs to be

if(dtaLen <= 32)
    {
        CANI2C.beginTransmission(0x41);
        CANI2C.write(canNum ? 0x17 : 0x07);
        CANI2C.endTransmission();

        CANI2C.requestFrom(0x41, dtaLen);

        for(int i=0; i<dtaLen; i++)
        {
            str[i]= CANI2C.read();
        }
    }

After this change I could use the CANBED dual in my sprinter to sniff the internal CANBUS's. before this changes it was even starting to think that there were extended CAN message on the CANBUS. Please fix this in your code, I am not the only one having this problem.

Avoid "read" hanging if there is no CAN data ?

Hi,

I have the following code:

Serial.println ("Reading 0");
if(CAN1.read (&id,&ext,&rtr,&fd,&len,dtaGet))
{
  Serial.print ("0 ");
  Serial.println (len);
}

Serial.println ("Reading 1");

It seems to hang if there is no data on the canbus - how can I avoid this please ?

Thanks !

Source code for the GD32E103CBT6 firmware

Hi,
I just received my CANBedDual and I've been able to run a simple loop example.
Looking a bit more into this library, I noticed there is no source code available for the GD32E103 used as CAN controller.

Would it be possible to have it published under a FOSS licence as well?

Thanks

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.