Skip to content

Conversation

@es-m-se
Copy link
Contributor

@es-m-se es-m-se commented May 3, 2019

Hi Guys,

I've added an interface for the seeedstudio canbus interface following a blog post:
Posted by Wilfried Voss on September 19, 2018 - copperhilltech.com

I'm not sure if this is something you'd want this in your repo? I thought a pull request was the easiest way to ask. Note it probably still needs a bit of work I'll update it as I go. Please let me know if you're keen.

@codecov
Copy link

codecov bot commented May 3, 2019

Codecov Report

Merging #567 into develop will decrease coverage by 0.85%.
The diff coverage is 19.81%.

@@             Coverage Diff             @@
##           develop     #567      +/-   ##
===========================================
- Coverage    63.91%   63.06%   -0.86%     
===========================================
  Files           63       65       +2     
  Lines         5623     5734     +111     
===========================================
+ Hits          3594     3616      +22     
- Misses        2029     2118      +89

Copy link
Collaborator

@christiansandberg christiansandberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation should also be updated. Maybe you can move the notes there instead.

for i in range(0, msg.dlc):
byte_msg.append(msg.data[i])
byte_msg.append(0xBB)
self.ser.write(byte_msg)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the format of the sent frame in the notes. It is a little strange that the transmitted frames use timestamps but the received do not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could take a week or two for me to resolve this.

I suspect you've picked up that I've started from serial_can.py, and that I not got to implementing the required send packet. My current application is only required to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felixdivo felixdivo added this to the 4.0 Release milestone May 12, 2019
@joaofl
Copy link

joaofl commented May 21, 2019

I've been looking forward to this integration. Would also be nice if an example on how to use this specific converter was added to the "examples" folder for getting started easily.

@marcel-kanter
Copy link
Contributor

Can you please clearify the name a bit more to avoid confusion with others?
usb_can_analyzer is a bit generic and there are many things that match that name.
Ixxat has a cananalyzer
vectors canalyzer

something like
seedstudio_usbcan
seedstudio_can

@es-m-se
Copy link
Contributor Author

es-m-se commented May 23, 2019

How's seeed_can for a name? (3 e's like in www.seeedstudio.io)
I'll work on the doco over the weekend coming.

@marcel-kanter
Copy link
Contributor

That sounds good.
Can you please check if they provide other can interfaces, or is this one the only one?

@christiansandberg
Copy link
Collaborator

Or just seeedstudio. Most interfaces here use the manufacturer name since the API is usually the same for all their CAN products and the word CAN is a bit redundant in a CAN library.

@felixdivo
Copy link
Collaborator

Can this be merged?

@es-m-se
Copy link
Contributor Author

es-m-se commented Jun 9, 2019

working on docs now, I'll update when done, might be tomorrow.

@es-m-se
Copy link
Contributor Author

es-m-se commented Jun 10, 2019

debugging something, I'll update again tomorrow.

@es-m-se
Copy link
Contributor Author

es-m-se commented Jun 12, 2019

The last commits adds doco but made a few changes as well.

  1. I changed the name of the main class from 'CanAnalyzer' to 'SeeedBus', it seemed to fit better with the interface name and align with the other interfaces.
  2. the debugging I was doing determined that will it was sometimes working with the CRC library but were configurations when it didn't. I did a bit more digging and found that the CRC is actually very simple, so crccheck package is not needed. I've removed it from the interface and the setup.py file. Note: without this in the setup file it only needs serial, which is identical the existing serial option. I've left them both for now but happy to remove seeedstudio from the setup.py file altogether if preferred.

Apart from that its done.
(Do I need to resolve the conversations above to close out the 'Changes requested'?)

@felixdivo
Copy link
Collaborator

(No, that will only make the thread of comments more readable. The review has to be re-requested.)

@felixdivo
Copy link
Collaborator

@christiansandberg Do you now approve this PR?

Copy link
Collaborator

@christiansandberg christiansandberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, sorry. Looks good!

@felixdivo
Copy link
Collaborator

@shedfly The linter (see here for the problems) and formatter (please reformat can/interfaces/seeedstudio/seeedstudio.py for example with this) are not yet happy, but if they are we can immediately merge this. It should be relatively easy to fix this.

@felixdivo felixdivo merged commit 0b7af59 into hardbyte:develop Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants