Page 2 of 2

Posted: Sat Sep 12, 2015 12:05 am
by roostinds
So I cleared everything and put the script in and now I get this message:

running lua script len(1455)...lua: startup script error: ([string "startup"]:13.0: malformed number near '00a0')
done

Posted: Mon Sep 14, 2015 5:29 am
by madjak
Can you please copy everything out of the script window and post it here. There is an error on line 13 of the script.

Posted: Mon Sep 14, 2015 9:26 pm
by roostinds
SO i got it to work but not all channels are displaying. I have attached the script and the can bus data log. Also, how do i pull the RPM data for the shiftx script. I see everyone using getRPMtimer but i am assuming everyone is tapping the Tach wire where i am pulling it from CAN.. Thanks.

Posted: Tue Sep 15, 2015 2:12 am
by madjak
you probably need someone else to help out regarding debugging the CAN log, however I can see no "32546819" values in the stream. Either you don't have an o2 sensor hooked up or that value is streaming out somewhere on another value.

Also there are three "32546820.0" values in a row with different data. I'm not sure why but I think something is getting confused.

Actually looking at the data the first "32546820.0" value is actually the 32546819.0 one as it ends with 220 and 96 bits (which is 13.8 volts .. 220x256 + 96 = 13.8)

The second "32546820.0" value is the actual "32546820.0" data which contains the map, fps ,ops.

The third is only present sometimes which means it's being output at a lower frequency. It doesn't look like it contains any data except the last.

One last thing is the data is all even values... I suspect there is a rounding issue given the values are so high. You need to email the guys to see if there is something they can fix at their end.

Posted: Fri Sep 18, 2015 9:54 pm
by brentp
Hi,

Sorry I missed this.

madjak, thanks for your analysis. I think there might be something to investigate in the firmware where we might be dropping the bit on 29 bit CAN messages.

First thing I'll focus on is sending messages in loopback - from CAN 2 to CAN 1 to see if we're mis-reading the CAN ID when it's incoming.

Posted: Tue Sep 29, 2015 8:49 pm
by roostinds
Any Progress on this??

Posted: Tue Sep 29, 2015 8:52 pm
by brentp
We're still looking at it. Currently our approach is to send CAN data from one RCP to another, verifying whether or not the CAN id's are sent correctly.

We'll keep this thread posted as we find out more.

Posted: Thu Oct 01, 2015 5:27 am
by madjak
you could probably program a work around by detecting if there a zero values in the data that correspond to set unique locations in the data chain.

32546820.0, 129.0, 0.0, 0.0, 0.0, 5.0, 48.0, 220.0, 96.0,
32546820.0, 3.0, 185.0, 0.0, 3.0, 3.0, 0.0, 0.0, 8.0,
32546820.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10.0,

So if the first value = 0 then discard, it's not required
Then if the second value = 0 the data 32546820.0, 129.0, 0.0, 0.0, 0.0, 5.0, 48.0, 220.0, 96.0 is the 32546819 data, if not then 32546820.0, 3.0, 185.0, 0.0, 3.0, 3.0, 0.0, 0.0, 8.0 is 32546820.

So something like this:

Code: Select all

CAN_map = { 
[32546816] = function(data) 
  map_chan(rpmId, data, 0, 2, 0.39063, 0) 
  map_chan(tpsId, data, 4, 2, 0.0015259, 0) 
  map_chan(atsId, data, 6, 1, 1.8, 32) 
  map_chan(ctsId, data, 7, 1, 1.8, 32) 
end, 
[32546820] = function(data)
  if data[0] ~= 0 then
    if data[1] == 0 then
      --run data (its 32546819)
      map_chan(afrId, data, 1, 1, 0.057227, 7.325)
    else
      --run data (its 32546820)
      map_chan(mapId, data, 0, 2, 0.014504, -14.6960) 
      map_chan(fpsId, data, 3, 1, 0.580151, 0) 
      map_chan(opsId, data, 4, 1, 0.580151, 0)
    end
  else
    --drop data (its the third line)
  end
end
}
Bit nasty but it's at least one way to work around the issue.

Posted: Tue Oct 27, 2015 3:56 pm
by brentp
Hi,

We have a planned fix that will show up in the 2.8.6 release. Hang tight!