RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Robust txCAN()? errors and time outs
Author Message
Reply with quote
Post Robust txCAN()? errors and time outs 
Hello,

I'm curious about how to make my sending of CAN messages as robust as possible. I notice that I occasionally get fail warnings which are triggered when txCAN() returns 0. I'm sending data at 50Hz (a send function is running with an onTick() at 50Hz) with the CANBUS set to 1mbps.

How should the "timeout" parameter be used? the default value is 100ms which seems very long. I don't want to block for 100ms if it can't send. Should i use a shorter value if i intend to run at 50Hz (20ms period)?
https://wiki.autosportlabs.com/RaceCapturePro_Lua_Scripting#txCAN

Also is it ok to rapid fire several txCAN() calls in a row? I've seen some example code insert sleep(10) statements, but i don't want to wait around for 10ms.

Thanks,
Dan

View user's profile Send private message
Reply with quote
Post  
There's currently a 2 message buffer for sending CAN messages, so at the moment you'll need to work around that. Fine-tuning your timeout in your script is likely the best way to go for now.


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum