View Single Post
Old 10-29-2010, 01:58 AM   #4 (permalink)
nickdigger
EcoModding Apprentice
 
Join Date: Aug 2009
Location: terra firma
Posts: 138
Thanks: 4
Thanked 24 Times in 22 Posts
It looks like RPM is disabled in v0.86, but the following code "should" "probably" work, though someone on v0.86 will need to test it.


unsigned long instantrpm(){
unsigned long instInjTime = instInjEnd - instInjStart;
if (instInjTime == 0) return 0;

init64(tmp1, 0, 1000 * instInjCount);
init64(tmp2, 0, 120000000ul);
mul64(tmp1,tmp2);
init64(tmp2, 0, instInjTime * parms[injPulsesPer2Revolutions]);
div64(tmp1,tmp2);
return tmp1[1];
}


//also, replace existing doDisplayCustom with this:
void doDisplayCustom() {
displayTripCombo("MG","LK", instantmpg(), " S", " S", instantmph(), "GH","LH",
instantgph(), "RP","RP", instantrpm());
}
  Reply With Quote
The Following User Says Thank You to nickdigger For This Useful Post:
SuzukiSteve (10-29-2010)