Unkown Identifier "lt" ?

Questions specific to Megatune. (Only about the tuning software, not about MS1/MS2 code or code features)
Note that Megatune is now obsolete.

Moderator: efahl

Unkown Identifier "lt" ?

Postby beige91 » Tue May 29, 2007 10:36 pm

i rewrote some code to add a boost gauge and vaccum gauge to the frontend, and now i get this error:

Megasquirt-II.ini:1657: Unkown Identifier 'It' terminate megatune?

clicking on no does absolutely nothing, so i figure i'll just head over to line 1657 and see what's up. turns out line 1657 looks like this.

curve = barometerCorr, "Non-Linear Barometric Correction"
; topicHelp = "http://www.megasquirt.info/xxx"
columnLabel = "Barometer", "Correction"
xAxis = 60, 120, 7
1656 yAxis = -30, 30, 7
1657 xBins = baroCorrVals, barometer
1658 yBins = baroCorrDelta
gauge = barometerGauge


and that's nowheres close to what i added to get different gauges.... and furthermore there's no "It" anywhere near there...

this is what I added

For example, to create boost and vacuum gauges in MegaTune, you would add to:

* [OutputChannels]
vacuum = {(barometer-map)*0.2953007} ; Calculate vacuum in in-Hg.
boost = {map %lt; barometer ? 0.0 : (map-barometer)*0.1450377} ; Calculate boost in PSIG.

* [GaugeConfigurations]
; Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld
vacuumGauge = vacuum, "Engine Vacuum", "in-HG", 0, 30, 0, 0, 30, 30, 1, 1
boostgauge = boost, "Engine Boost", "PSIG", 0, 20, 0, 0, 15, 20, 1, 1

* [FrontPage]
gauge7 = vacuumGauge
gauge8 = boostgauge


oh wait, i think i found something, here's boost = {map
%lt;

so now does anyone know why that gives an error message? whatever parameter %lt is supposed to be isn't coded or is given another name?
User avatar
beige91
MS/Extra Newbie
 
Posts: 26
Joined: Fri May 25, 2007 10:58 pm

Postby efahl » Wed May 30, 2007 5:17 am

It might help if you posted the ini file...

Looks like a typo in that expression, or an html editor that turned a "<into> 100 }

but I have no way of confirming this.
efahl
Site Admin
 
Posts: 2793
Joined: Mon Feb 16, 2004 4:15 pm
Location: San Clemente, California, USA

Postby beige91 » Wed May 30, 2007 8:29 am

here it is, see what's up
User avatar
beige91
MS/Extra Newbie
 
Posts: 26
Joined: Fri May 25, 2007 10:58 pm

Postby efahl » Wed May 30, 2007 11:46 am

What editor did you use to see those line numbers? They are clearly wrong, here's line 1657:
Code: Select all
   boost = {map %lt; barometer ? 0.0 : (map-barometer)*0.1450377} ; Calculate boost in PSIG.   


As suspected, someone used an editor that thinks the file is html or whatever and turned a perfectly good less-than into some funky encoded version. Tell whoever created this file so they can fix it in the original, but you can change yours so that the %lt; is < and it should work fine.
efahl
Site Admin
 
Posts: 2793
Joined: Mon Feb 16, 2004 4:15 pm
Location: San Clemente, California, USA

Postby beige91 » Wed May 30, 2007 1:02 pm

hehe, it's me that wrote that.... actually i just copied it from here:

http://www.megamanual.com/megatune.htm#installgauge

and i used MS word to see the line #s because in notepad i don't know if you can see line #s... and anyways everything just ran together and it was almost impossible to find the correct parts...

but i did as you told and it worked great... the car's not running the MS yet so we'll have to see if it actually works...

do you know of any way to write the code to combine the boost and vacuum on one gauge?
User avatar
beige91
MS/Extra Newbie
 
Posts: 26
Joined: Fri May 25, 2007 10:58 pm

Postby efahl » Wed May 30, 2007 3:54 pm

beige91 wrote:do you know of any way to write the code to combine the boost and vacuum on one gauge?
Sure, create a vacuum variable just like the boost one that reports zero when boost is on:

Code: Select all
   vacuum = { boost > 0 ? 0 : map blah blah }
   vacBoost = { vacuum + boost }

(The "map blah blah" is as you see on the web page in the manual, probably want it to be negative.)

Then just display vacBoost on some gauge with proper limits. You'll be displaying mixed units, but whatever.
efahl
Site Admin
 
Posts: 2793
Joined: Mon Feb 16, 2004 4:15 pm
Location: San Clemente, California, USA


Return to Megatune

Who is online

Users browsing this forum: No registered users and 0 guests