AIM RCP integration

Discussion on the Lua Scripting capabilities for RaceCapture/Pro. Also see the <a href="http://autosportlabs.net/RaceCapturePro_Lua_Scripting">Lua Scripting Guide</a>

Moderators: JeffC, stieg

Post Reply
Olaaf
Posts: 16
Joined: Wed Jan 29, 2014 2:50 am
Location: United States

AIM RCP integration

Post by Olaaf »

Hi Guys

I'm using the AIM /RCP integration script downloaded from the wiki with no mods, and I'm a bit confused as to how my race capture is picking up channels- for example, I get valid RPM info over the CAN bus, but nowhere do the channels names match up. In AIM, Channel "ECU_1" is named "M_RPM" and is mapped to SmartyCam "Engine RPM". The racecapture script is looking for "RPM" and it's picked up. Is this because it's looking for CAN ID 1056? Are the CAN addresses sequential from 1056 through 1074, set in order for the smartycam? Or is there a secret channel naming that isn't visible in the AIM setup software?

One other question, I'm set for Fahrenheit in AIM, but the Engine Temp, which is also not matched up in names, comes through, but in Celsius. Does AIM simply default to Celsius over CAN and re-convert at the SmartyCam? If yes, do I need to add to the script a conversion function?

See attached screengrab.

Thanks!
olaaf
Attachments
AIM-RCP.jpg
AIM-RCP.jpg (196.97 KiB) Viewed 4121 times

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi - it's all based on CAN IDs - so AIM may be sending them behind the scenes in celcius and then converted for display.

So yes, you may need a conversion function to get it to the units you prefer.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Olaaf
Posts: 16
Joined: Wed Jan 29, 2014 2:50 am
Location: United States

Post by Olaaf »

Got it, thanks. I don't have the hardware with me so i can't test until i get to the track, but will adding this formula work?

tempId = addChannel("EngineTemp", 1, 0, 0, 250, 'F') * (1.8 + 32)

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Unfortunately, that won't work. The 'addChannel' function returns a reference or a 'handle' to the channel that was created.

The actual channel value is updated when the function setChannel() is called.

To perform a conversion, you should implement a filter similar to how the BMW E46 script works. see the function toF() in the script here:

https://wiki.autosportlabs.com/BMW_E46_CAN
in that toF() function it takes the raw value, converts it and returns the converted value.

If you get stuck just paste your updated script here and we'll help you out.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

bmotorsports
Posts: 4
Joined: Mon Jan 07, 2013 8:54 pm

Re: AIM RCP integration

Post by bmotorsports »

Olaaf wrote:Is this because it's looking for CAN ID 1056? Are the CAN addresses sequential from 1056 through 1074, set in order for the smartycam? Or is there a secret channel naming that isn't visible in the AIM setup software?
Where did 1074 come from? Do you have the message ID structure from 1056 to 1074? That would help with some integration :) .

Post Reply