CAN LOTUS BROADCAST

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

flycat
Helpful MS/Extra'er
Posts: 58
Joined: Thu Jul 29, 2010 9:05 am
Location: slopes of Etna...
Contact:

Re: CAN LOTUS BROADCAST

Post 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
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: CAN LOTUS BROADCAST

Post 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
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
AbatelliCristian
Super MS/Extra'er
Posts: 855
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Post 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
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: CAN LOTUS BROADCAST

Post 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
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
AbatelliCristian
Super MS/Extra'er
Posts: 855
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Post 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
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: CAN LOTUS BROADCAST

Post 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
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
flycat
Helpful MS/Extra'er
Posts: 58
Joined: Thu Jul 29, 2010 9:05 am
Location: slopes of Etna...
Contact:

Re: CAN LOTUS BROADCAST

Post 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
Post Reply