Author Topic: Compilation errors - Megatune 2.25 / Visual C++ 2010  (Read 9419 times)

Offline irishtwincam

  • Full Member
  • ***
  • Posts: 199
  • BHP: 9
Compilation errors - Megatune 2.25 / Visual C++ 2010
« on: July 25, 2010, 02:16:14 pm »
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
« Last Edit: July 25, 2010, 02:20:47 pm by irishtwincam »

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: Compilation errors - Megatune 2.25 / Visual C++ 2010
« Reply #1 on: July 25, 2010, 02:19:50 pm »
Why are you wasting time with Megatune?

Always use the latest Vemstune

Offline irishtwincam

  • Full Member
  • ***
  • Posts: 199
  • BHP: 9
Re: Compilation errors - Megatune 2.25 / Visual C++ 2010
« Reply #2 on: July 25, 2010, 02:22:41 pm »
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.

Offline MWfire

  • Hero Member
  • *****
  • Posts: 721
  • BHP: 35
Re: Compilation errors - Megatune 2.25 / Visual C++ 2010
« Reply #3 on: July 25, 2010, 03:52:47 pm »
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.

Offline DI-Racing

  • Jr. Member
  • **
  • Posts: 11
  • BHP: 1
Re: Compilation errors - Megatune 2.25 / Visual C++ 2010
« Reply #4 on: July 29, 2010, 06:05:47 pm »
vemstune map app!!.good luck with that dude... ;D

Offline rob@vems.co.uk

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: Compilation errors - Megatune 2.25 / Visual C++ 2010
« Reply #5 on: July 30, 2010, 02:52:54 am »
Wouldn't your time be better invested actually fitting the VEMS?!? ;D ;D ;D

Offline irishtwincam

  • Full Member
  • ***
  • Posts: 199
  • BHP: 9
Re: Compilation errors - Megatune 2.25 / Visual C++ 2010
« Reply #6 on: July 31, 2010, 11:56:45 am »
Ive had too many outgoings lately.
And my car is only JUST driving again.

Offline irishtwincam

  • Full Member
  • ***
  • Posts: 199
  • BHP: 9
Re: Compilation errors - Megatune 2.25 / Visual C++ 2010
« Reply #7 on: July 31, 2010, 12:23:48 pm »
So I need to parse a bytestrem based on the following

Code: [Select]
[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
« Last Edit: July 31, 2010, 12:26:33 pm by irishtwincam »

Offline rob@vems.co.uk

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: Compilation errors - Megatune 2.25 / Visual C++ 2010
« Reply #8 on: August 01, 2010, 11:41:12 am »
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).

Offline irishtwincam

  • Full Member
  • ***
  • Posts: 199
  • BHP: 9
Re: Compilation errors - Megatune 2.25 / Visual C++ 2010
« Reply #9 on: August 01, 2010, 04:47:40 pm »
As long as I can convert the binary to "Ints" or rather "TInts" in Symbian, the multiplication factor can be done after.
Cheers dude!