Shift X3 Issues

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
shields8
Posts: 12
Joined: Fri Sep 18, 2020 7:17 pm

Shift X3 Issues

Post by shields8 »

Hey team,

Have a Pro Mk4 with the Shift X3 wired into Can2.
This is the only CAN device running.
Data is being pulled via ODB2 (legacy adaptor) from a 2003 infiniti g35
I have RPM setup as a CAN channel - though honestly not sure if I need that.

RPM pulls into RCP - shows up on the dash but the ShiftX3 just does the disco lights back and forth despite that not being the script that is currently written. Using the preset for Shift light and gear calc with the change of green lights to 700 RPM to try and garage test this.

I feel like I am missing something fundamental since this appears to have been setup to be easy...any thoughts as to what I am missing? Thought I was good at this type of stuff but RCP seems to slowly breaking me haha...


setTickRate(30)

-- Set ShiftX3 configuration parameters with default parameters
-- orientation: 0=normal, 1=inverted (display above LED bar)
-- brightness: 0-100%, 0 = auto brightness
-- can bus: 0=CAN1, 1=CAN2
sxSetConfig(0,0,1)

--create gear channel
gearId = addChannel("Gear", 10, 0, 0, 6)

--config shift light
sxCfgLinearGraph(0,0,0,7000) --left to right graph, smooth style, 0 - 7000 RPM range

sxSetLinearThresh(0,0,700,0,255,0,0) --green at 700 RPM for testing purposes - at idle should be lit up green
sxSetLinearThresh(1,0,5000,255,255,0,0) --yellow at 5000 RPM
sxSetLinearThresh(2,0,6000,255,0,0,10) --red+flash at 6000 RPM

function onTick()
sxUpdateLinearGraph(getChannel("RPM"))

-- calculate gear: tire diameter(cm), final gear ratio, individual gear ratios 1-6
local gear = calcGear(62.7, 3.45, 4.23, 2.52, 1.66, 1.22, 1.0, 0.8)
setChannel(gearId, gear)
sxSetDisplay(0, gear)
end

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

Re: Shift X3 Issues

Post by brentp »

Hi,

Please let us know how you have it wired up. Are you using all plug and play harness connections? A picture would be helpful.

Note, the "Disco" test script shows random colors on the display. The "scanning back and forth" means that it has power, but does not have CAN bus connectivity.

shields8
Posts: 12
Joined: Fri Sep 18, 2020 7:17 pm

Re: Shift X3 Issues

Post by shields8 »

Hey Brent,

All plug n play.

Can1/2 Port - > Can Splitter ->CAN A cable to ODB2 Legacy adaptor (pulling data and functioning, and providing power to RCP)
->CANB -> Inline Terminator -> Shift X3

Wrote it out because the pictures are hard to see through the windshield.

https://www.dropbox.com/scl/fi/gd0lw9cu ... xznbg&dl=0
https://www.dropbox.com/scl/fi/rn2ts5mo ... 88yw4&dl=0

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

Re: Shift X3 Issues

Post by brentp »

Hi, thanks for the update. Please check that you have the following set:

Setup / CAN Bus
* Turned on (switch at the top)
* CAN1 - 500K
* CAN2 - 1MB
* Termination - enabled for both

shields8
Posts: 12
Joined: Fri Sep 18, 2020 7:17 pm

Re: Shift X3 Issues

Post by shields8 »

Baud rate update appears to have fixed it. CAN2 was originally at 500 so that seems to have sorted it out. Thanks for the help

Now I need to do some reading to figure out how to get the side buttons on the ShiftX3 to scroll the pages on the app.

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

Re: Shift X3 Issues

Post by brentp »

Glad you figured that out.

ShiftX3 should cause the dashboard pages to navigate left/right by default.

Check under the dashboard settings (gear button / more settings / Behavior tab) and make sure that "Remote Dashboard navigation" is set to on (default is "on")

Post Reply