ShiftX2 Only half the lights work

Q&A For ShiftX2, RGB sequential shift light <a href="https://wiki.autosportlabs.com/ShiftX2">Installation and Operation Guide</a>
Post Reply
tylerjw
Posts: 10
Joined: Sat Jan 05, 2019 7:21 pm

ShiftX2 Only half the lights work

Post by tylerjw »

Only the left three of the shift lights are working on ours. The right half of the lights don't turn on. Any idea what we could have done wrong. Below is my script.

Code: Select all

setTickRate&#40;25&#41;

-- Set ShiftX2 configuration parameters with default parameters
-- orientation&#58; 0=normal, 1=inverted &#40;display above LED bar&#41;
-- brightness&#58; 0-100%, 0 = auto brightness
-- can bus&#58; 0=CAN1, 1=CAN2
-- CAN base address&#58; Default&#58; 931328
-- Auto brightness scaling&#58; 0-255; Default&#58; 51
-- Enable / Disable button events
sxSetConfig&#40;0,0,1,931328,51,true&#41;

--config shift light
sxCfgLinearGraph&#40;1,1,0,6500&#41; --center graph, stepped style, 0 - 6500 RPM range

sxSetLinearThresh&#40;0,0,4000,0,255,0,0&#41; --green at 3000 RPM
sxSetLinearThresh&#40;1,0,5500,255,255,0,0&#41; --yellow at 5000 RPM
sxSetLinearThresh&#40;2,0,6500,255,0,0,10&#41; --red+flash at 6000 RPM

--configure first alert &#40;right LED&#41; as engine temperature &#40;F&#41;
sxSetAlertThresh&#40;0,0,205,255,255,0,0&#41; --yellow warning at 205F
sxSetAlertThresh&#40;0,1,225,255,0,0,10&#41; -- red flash at 225F

--configure second alert &#40;left LED&#41; as oil pressure &#40;PSI&#41;
sxSetAlertThresh&#40;1,0,0,0,0,255,10&#41; --red flash below 15 psi
sxSetAlertThresh&#40;1,1,15,255,255,0,5&#41; --yellow flash 15-20 PSI
sxSetAlertThresh&#40;1,2,20,0,0,0,0&#41; --above 20, no alert

function shiftLight&#40;&#41;
  --update RPM
  sxUpdateLinearGraph&#40;getChannel&#40;"RPM"&#41;&#41;

  --update engine temp alert
  sxUpdateAlert&#40;0, getChannel&#40;"EngineTemp"&#41;&#41;

  --update oil pressure alert
  sxUpdateAlert&#40;1, getChannel&#40;"OilPress"&#41;&#41;
end

function onTick&#40;&#41;
  collectgarbage&#40;&#41;
  shiftLight&#40;&#41;
end
[/code]

ferg
Posts: 36
Joined: Mon Dec 03, 2018 7:56 pm
Location: Paso Robles, California
Contact:

Post by ferg »

It looks to me like because you are using stepped style, you set the number of LEDs in the sxSetLinearThresh to 0 for each threshold, you probably only get one (or two because centered) light per threshold. I would first change the number of LEDs per threshold to something non-zero. You can define up to 5 thresholds (0-4), but you only define 3 (0-2).

Since it isn't working, you might want to assign the result of the various sxXXXX() functions to a value that you print in the log. I think this would give you an idea if you are passing bad parameters to the interface.

To rule out a hardware issue -- do all the lights turn on when the ShiftX3 is powered up, and no CAN messages sent?
David Ferguson
Veracity Racing Data
Autosport Labs Preferred Dealer
https://veracitydata.com

Post Reply