Displaying CAN data in realtime

General Q&A specific to RaceCapture/Pro. For app related questions post in the RaceCapture App forum. also see the <a href="http://www.autosportlabs.net/RaceCapture">RaceCapture Information Page</a>

Moderators: JeffC, rdoherty, stieg, brentp

Post Reply
Copper280z
Posts: 30
Joined: Sun Mar 15, 2015 3:03 am
Location: United States

Displaying CAN data in realtime

Post by Copper280z »

I wrote a relatively simple script to display CAN data in realtime from the serial port of the RCP, thought it might be useful here. The lua script the RCP has loaded is just printing CAN data like : "ID, byte, byte, byte, ...". I believe there's an example script that does this in the wiki somewhere.

In short I'm reading the serial port, adding the data received to a sorted text list, then updating the text list every 0.2 sec. This is only my second attempt at python, so be gentle. :)

I did discover that it's pretty easy to make the lua script crash. I believe the serial buffer is filling up and then the script crashes. This doesn't seem to be the ideal way to handle that, but I'm not sure.

https://github.com/Copper280z/CanDispla ... Display.py

Post Reply