News:

New Users: Send [email protected] an email with your account name. I've turned off auto-approve to reduce the 100 new spam accounts a day. Thanks, -Jason

Main Menu

Compilation errors - Megatune 2.25 / Visual C++ 2010

Started by irishtwincam, July 25, 2010, 02:16:14 PM

Previous topic - Next topic

irishtwincam

Downloaded MegaTune 2.25 source code for visual c++ from here.
http://www.megamanual.com/files/software/MT225p1_VC++.NET.zip

I get compilationerrors in Visual Studio/C++ 2010.

Is the code unfinished?
Does anyone have working code?

Here are the compilation errors
http://skynet.ie/~eireae86/CompilationErrors.txt

gunni

Why are you wasting time with Megatune?

Always use the latest Vemstune

irishtwincam

Im familiar with MegaTune.
I wanted to examine the code that gets data from vems and converts binary (or whatever) to valid numbers
water temp, rpm, air pressure etc.

I want to make a simple app for my Nokia phone using Symbian SDK to display these parameters.
Afterwards i can make software guages and datalog everything.

MWfire

in every firmware realease you have comm.c program, so in that program you can see vems communication schematic.
Basicly laptop send 'A' (or diffrent letter for extended information), and vems then return 63bytes of data.

DI-Racing

vemstune map app!!.good luck with that dude... ;D

[email protected]

Wouldn't your time be better invested actually fitting the VEMS?!? ;D ;D ;D

irishtwincam

Ive had too many outgoings lately.
And my car is only JUST driving again.

irishtwincam

#7
So I need to parse a bytestrem based on the following


[OutputChannels]
; The number of bytes MegaTune should expect as a result

deadValue = { 0 } ; Convenient unchanging value.

ochBlockSize = 56
ochGetCommand = "A"
secl = scalar, U08,  0, "sec", 1.000, 0.000
squirt = scalar, U08,  1, "bits", 1.000, 0.000
engine = scalar, U08,  2, "bits", 1.000, 0.000
barometer = scalar, U08,  3, "ADC", 1.000, 0.000
mapADC = scalar, U16,  4, "Pa", 1.000, 0.000
matADC = scalar, U08,  6, "ADC", 1.000, 0.000
cltADC = scalar, U08,  7, "ADC", 1.000, 0.000
tpsADC = scalar, U08,  8, "ADC", 1.000, 0.000
batADC = scalar, U08,  9, "ADC", 1.000, 0.000
egoADC = scalar, U08, 10, "ADC", 1.000, 0.000
egoCorrection = scalar, U08, 11, "%", 1.000, 0.000
airCorrection = scalar, U08, 12, "%", 1.000, 0.000
warmupEnrich = scalar, U08, 13, "%", 1.000, 0.000
rpmVHR = scalar, U16  14, "rpm", 1.000, 0.000
pulseWidth = scalar, U08, 16, "ms", 0.100, 0.000
accelEnrich = scalar, U08, 17, "%", 1.000, 0.000
baroCorrection = scalar, U08, 18, "%", 1.000, 0.000
gammaEnrich = scalar, U08, 19, "%", 1.000, 0.000
veCurr = scalar, U08, 20, "%", 1.000, 0.000
INTdwell = scalar, U08, 21, "mS", 1.000, 0.000
INTspark = scalar, U08, 22, "", 1.000, 0.000
iacPos = scalar, U08, 23, "%", 1.000, 0.000
egt1ADC = scalar, U16, 24, "Deg", 1.000, 0.000
egt2ADC = scalar, U16, 26, "Deg", 1.000, 0.000
ebpADC = scalar, U16, 28, "Deg", 1.000, 0.000
fpADC = scalar, U16, 30, "Deg", 1.000, 0.000
misc1ADC = scalar, U16, 32, "Deg", 1.000, 0.000
misc2ADC = scalar, U16, 34, "Deg", 1.000, 0.000
misc3ADC = scalar, U16, 36, "Deg", 1.000, 0.000
misc4ADC = scalar, U16, 38, "Deg", 1.000, 0.000
latgtADC = scalar, U08, 40, "", 1.000, 0.000
knock_cyl_0_knock_val =scalar, U16, 41, "", 1.000, 0.000
knock_cyl_0_noise_val =scalar, U16, 43, "", 1.000, 0.000
knock_cyl_0_adjust =scalar, U08, 45, "Deg", 0.250, 0.000
knock_cyl_0_state = scalar, U08, 46, "", 1.000, 0.000
status1 = scalar, U08, 47, "", 1.000, 0.000

   ; boost_tgt >> 5 means mult with 4 for "real" boost target (take care >> 5 massive rounding errors)
boost_tgt = scalar, U08, 48, "kPa", 4.000, 0.000
boost_dc = scalar, U08, 49, "%", 1.000, 0.000
boost_integral = scalar, S08, 50, "", 1.000, 0.000
iac_integral = scalar, S08, 51, "", 1.000, 0.000

[email protected]

Yep, thats it in a nutshell - a 56 byte block will be sent back when you send 'A'
Map that into a buffer, then use the index number to access the relevent data that you're after.
You make then have to apply a transform to the value (RPM for example is value * 100).

irishtwincam

As long as I can convert the binary to "Ints" or rather "TInts" in Symbian, the multiplication factor can be done after.
Cheers dude!