Page 3 of 3

Re: CAN LOTUS BROADCAST

Posted: Mon Dec 11, 2017 5:13 am
by flycat
Hi James, sorry for retard, yesterday i have tested the car.

Result:

-CLT Ok
-RPM Ok
-KMH Not work (why? in the first test has good)
-Fuel level OK
-SHIFT LIGHT OK
- OIL WARNING LAMP OK
- MIL/CHECK LAMP tested status when engine not running and it's OK

The msq:
lotus_test2.msq
(273.44 KiB) Downloaded 91 times
Bye, Luca

Re: CAN LOTUS BROADCAST

Posted: Tue Dec 12, 2017 5:38 am
by jsmcortina
Something strange with the speed calc, the broadcast testing results don't match up with the reverse engineered spec for the speed.

Test code sent.

James

Re: CAN LOTUS BROADCAST

Posted: Fri Dec 15, 2017 7:19 am
by AbatelliCristian
I James,
I see your txt. I think there is a error in the conversion.

My idea is:

kph = (unsigned int) ((outpc.vss1 * 530538ul) / 10000ul);
From outpc.vss1 = 100, we get kph = 5305
vssout=(unsigned int) ((kph*912)/1000) //***** 100*912/1000 = 91= 5b

data[0] = vssout
data[1] = NOT USED

Re: CAN LOTUS BROADCAST

Posted: Fri Dec 15, 2017 1:47 pm
by jsmcortina
Did you test the latest code I sent? It was similar to the first version with the scaling factor set to 92% of the original.

James

Re: CAN LOTUS BROADCAST

Posted: Fri Dec 15, 2017 3:30 pm
by AbatelliCristian
kph = (unsigned int) ((outpc.vss1 * 3312ul) / 10000ul);
From outpc.vss1 = 100, we get kph = 33
(36 * 92% = 33)
data[0] = 0
data[1] = 33



The error is in data1... data1 NOT USED

Re: CAN LOTUS BROADCAST

Posted: Fri Dec 15, 2017 3:46 pm
by jsmcortina
That's not what code I sent looks like though?

Code: Select all

  	kph = (unsigned int) ((outpc.vss1 * 530538ul) / 10000ul); /* Tweaked scaling based on 'flycat' feedback */
data[0] = (kph >> 8) & 0xff;
For 10.0 ms-1 that gives data[0]=20 (20mph ?)
One of the data sources said that the speed was in mph.
Be aware that the test code I sent is clobbering "Sensors 5" with the raw value of "kph"

James

Re: CAN LOTUS BROADCAST

Posted: Mon Dec 18, 2017 3:02 pm
by flycat
Hi James, sorry for retard, i have tested the last code, now all fuction are active :yeah!: , kmh value isn't correct :oops: , but i have "calibrated" with a gps...with 1.35m of wheel diameter the value of instrument is correct :mrgreen:

Now we need only a correct scaling factor :RTFM:

Bye, Luca