Gear Indicator

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

VolvoGuy50
Master MS/Extra'er
Posts: 686
Joined: Sat Jan 01, 2011 4:42 pm
Location: Burlington, CT USA

Gear Indicator

Post by VolvoGuy50 »

I noticed that the way the gear indicator works is reverse is -1 and neutral is 0. Would it be possible to switch those to R and N respectively? Not a huge thing, but it's a bit weird seeing your dash say you're in "negative first" gear. :lol:
1992 Volvo 740 Wagon - Beater Car...CAI, 16T, catback, MS3/MS3X, & HID's
1996 Eagle Talon TSi AWD - Daily Driver...RAI, Big 16g, 3" TBE, HID's, etc.
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Gear Indicator

Post by jsmcortina »

That is exactly how I designed it. Reverse IS negative first gear - you go backwards.

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".
VolvoGuy50
Master MS/Extra'er
Posts: 686
Joined: Sat Jan 01, 2011 4:42 pm
Location: Burlington, CT USA

Re: Gear Indicator

Post by VolvoGuy50 »

jsmcortina wrote:That is exactly how I designed it. Reverse IS negative first gear - you go backwards.

James
I know, I know....I'm just saying, it it possible to make it display R & N, or does the gear output have to be an integer?
1992 Volvo 740 Wagon - Beater Car...CAI, 16T, catback, MS3/MS3X, & HID's
1996 Eagle Talon TSi AWD - Daily Driver...RAI, Big 16g, 3" TBE, HID's, etc.
gurov
Super MS/Extra'er
Posts: 1059
Joined: Sun Jun 01, 2008 11:54 pm

Re: Gear Indicator

Post by gurov »

VolvoGuy50 wrote:
jsmcortina wrote:That is exactly how I designed it. Reverse IS negative first gear - you go backwards.

James
I know, I know....I'm just saying, it it possible to make it display R & N, or does the gear output have to be an integer?
just create a few indicators with formula GEAR == -1, GEAR == 0, etc and overlay them.
2020 BMW X3M - bm3 - stage1
1994 Supra - ms3pnp pro - j&s
VolvoGuy50
Master MS/Extra'er
Posts: 686
Joined: Sat Jan 01, 2011 4:42 pm
Location: Burlington, CT USA

Re: Gear Indicator

Post by VolvoGuy50 »

gurov wrote:just create a few indicators with formula GEAR == -1, GEAR == 0, etc and overlay them.
Didn't know I could do that. :oops: Thank you for the hint.
1992 Volvo 740 Wagon - Beater Car...CAI, 16T, catback, MS3/MS3X, & HID's
1996 Eagle Talon TSi AWD - Daily Driver...RAI, Big 16g, 3" TBE, HID's, etc.
VolvoGuy50
Master MS/Extra'er
Posts: 686
Joined: Sat Jan 01, 2011 4:42 pm
Location: Burlington, CT USA

Re: Gear Indicator

Post by VolvoGuy50 »

OK, so I've finally gotten around to prepping my dash for use in the car. I want to fix this gear thing (I'm picky, ok?). Based on gurvo's post, I need to create a new indicator. I'm not exactly sure how to do this. I know I obv. need to add an indicator to the INI, but I'm unsure of where to put this. The normal gear indicator is actually a gauge, likely because it has more than two values. Could someone please give me a pointing in the correct direction?
1992 Volvo 740 Wagon - Beater Car...CAI, 16T, catback, MS3/MS3X, & HID's
1996 Eagle Talon TSi AWD - Daily Driver...RAI, Big 16g, 3" TBE, HID's, etc.
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Gear Indicator

Post by LT401Vette »

You can create the indicators by going into designer mode, then right click on the dash and select:
New --> Add Indicator

You will need to set the On Text and Off Text, set the off text to nothing and the on text to the gear.

You will need to set each indicator to an output channel that yields a boolean value.. That is where you will need the following in the ini.

Create a custom.ini file with this in it:

Code: Select all

[OutputChannels]

    reverse =   { gear == -1 ? 1:0 }
    neutral =   { gear == 0 ? 1:0 }
    gear1 =     { gear == 1 ? 1:0 }
    gear2 =     { gear == 2 ? 1:0 }
    gear3 =     { gear == 3 ? 1:0 }
    gear4 =     { gear == 4 ? 1:0 }
    gear5 =     { gear == 5 ? 1:0 }
    gear6 =     { gear == 6 ? 1:0 }

Put that custom.ini in the projectCfg dir of your project. Then back in TS, those OutputChannels will show up in the list of available OutputChannels. Assign one to each Indicator in a stack.

This will get the job done, but it is a work around hack due to a limitation. I will fix that.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
VolvoGuy50
Master MS/Extra'er
Posts: 686
Joined: Sat Jan 01, 2011 4:42 pm
Location: Burlington, CT USA

Re: Gear Indicator

Post by VolvoGuy50 »

LT401Vette wrote:You can create the indicators by going into designer mode, then right click on the dash and select:
New --> Add Indicator

You will need to set the On Text and Off Text, set the off text to nothing and the on text to the gear.

You will need to set each indicator to an output channel that yields a boolean value.. That is where you will need the following in the ini.

Create a custom.ini file with this in it:

Code: Select all

[OutputChannels]

    reverse =   { gear == -1 ? 1:0 }
    neutral =   { gear == 0 ? 1:0 }
    gear1 =     { gear == 1 ? 1:0 }
    gear2 =     { gear == 2 ? 1:0 }
    gear3 =     { gear == 3 ? 1:0 }
    gear4 =     { gear == 4 ? 1:0 }
    gear5 =     { gear == 5 ? 1:0 }
    gear6 =     { gear == 6 ? 1:0 }

Put that custom.ini in the projectCfg dir of your project. Then back in TS, those OutputChannels will show up in the list of available OutputChannels. Assign one to each Indicator in a stack.

This will get the job done, but it is a work around hack due to a limitation. I will fix that.
Awesome! Thanks Phil! That did the trick!
1992 Volvo 740 Wagon - Beater Car...CAI, 16T, catback, MS3/MS3X, & HID's
1996 Eagle Talon TSi AWD - Daily Driver...RAI, Big 16g, 3" TBE, HID's, etc.
9secz
Experienced MS/Extra'er
Posts: 204
Joined: Sun Jun 13, 2010 10:33 am
Location: NorCal USA
Contact:

Re: Gear Indicator

Post by 9secz »

Holy thread revival!

In preparation for gear based boost control, I want to add a gear indicator to my TS 2.6.02 dash. I expected to spend about 30 seconds looking for "gear indicator" in one of the new gauge pick lists. I must be blind cuz I'm not seeing it.

I've already programmed my 1.3.1 MS3 for VSS/RPM detection and burned my gear ratios.

Is there a canned indicator for me to pick, or must I do the custom ini file trick Phil describes above?

Jeff
Speedy_G
Experienced MS/Extra'er
Posts: 195
Joined: Fri Aug 01, 2014 8:30 am

Re: Gear Indicator

Post by Speedy_G »

9secz wrote: I want to add a gear indicator to my TS 2.6.02 dash. I expected to spend about 30 seconds looking for "gear indicator" in one of the new gauge pick lists. I must be blind cuz I'm not seeing it.
Hello Jeff,

perhaps this helps:
(its also there in the unregistred version)

But i dont know the TS 2.6.02 as it seems to be a beta version.
Maybe you should try the latest stable 2.6.01
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Gear Indicator

Post by LT401Vette »

The TS version wouldn't matter here, that is defined in the ini for the 1.3 firmware. It is probably just that there are so many defined it can be hard to find the one you are looking for. Maybe there should be a search on that menu :)
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
9secz
Experienced MS/Extra'er
Posts: 204
Joined: Sun Jun 13, 2010 10:33 am
Location: NorCal USA
Contact:

Re: Gear Indicator

Post by 9secz »

Thanks for the screen shot - now I see it.

Edit to say that having my laptop know what gear I'm in is pretty sweet. So far it's speaking the truth unless I do something obvious like drop into neutral and coast at highway speeds.

Jeff
red-racing
Helpful MS/Extra'er
Posts: 81
Joined: Fri Jul 31, 2015 4:30 pm

Re: Gear Indicator

Post by red-racing »

Is it possible to create a gear indicator for ms2?
Im thinking of a pot meter on the sequential shifter on a motorbike.
And then make a custom.ini with the values translated to gearvalue.

examples?
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Gear Indicator

Post by LT401Vette »

Yes.

You could create a couple channels in the custom.ini / Custom Configuration Editor (in TunerStudio MS Ultra) that take a stab at deriving the gear. Naturally there will be some error if not planted firmly in a gear.

Code: Select all

[OutputChannels]
   transGearRatio = { ([tireDiameterInInches]*rpm)/(335.675 * [finalDriveRatio] * speedInMPH) }, ":1"

   detectedGear = { transGearRatio  <  numHalfBetween1and2 ? 1 : transGearRatio  <  numHalfBetween2and3 ? 2 : transGearRatio  <  numHalfBetween3and4 ? 3 : 4 }
That would be for a 4 speed, more gears, keep going out.

You can try these formulas out in MLV with existing log files to see if they work for you.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Gear Indicator

Post by LT401Vette »

It is also worth noting you no longer need to stack indicators like above with TS 3.0+

There are String functions that allow you to display string valued based on an expression value.

Code: Select all


[PcVariables]
    gearDisplay = bits,   U08,  [0:2], "R", "N", "1", "2", "3", "4", "5"
    


[FrontPage]

    indicator = {   gear %2   }, "Gear: bitStringValue( gearDisplay , gear+ 1 )",   "Gear: bitStringValue( gearDisplay , gear+ 1 )",         white, black, green, black     


Putting the above in a custom.ini file on an MS3 where gear is already known as -1 through n will add an indicator to your right click menu that will display:
Gear: R
Gear: N
Gear: 1
Gear: 2
Gear: 3
Gear: 4
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
red-racing
Helpful MS/Extra'er
Posts: 81
Joined: Fri Jul 31, 2015 4:30 pm

Re: Gear Indicator

Post by red-racing »

Hi again.
I want to make gear indicator with ms2, and use a pot on an6 for input signal.
ex:
1gear - 1v (or adc)
neutral - 1.5v
2nd - 2v
3rd - 2.5v
4th - 3v
5th - 3.5v

how can I do this? I thougt make an .inc file and then numerius display, but it is possible to get indicators from .inc file as well?
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Gear Indicator

Post by LT401Vette »

no need for an inc file. Use the above, but set the index based on the adc value.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
tmbryhn
Helpful MS/Extra'er
Posts: 49
Joined: Sun Nov 06, 2011 6:27 am

Re: Gear Indicator

Post by tmbryhn »

Hi!
I'm helping Red Racing with this gear indicator and we're trying to figure this out.3

This is what I have done so far:

"
[OutputChannels]
deadValue = { 0 } ; Convenient unchanging value.

GearInput_analog = { (adc6/1023)*5 }, "VOLT"
GearInput_analog_test = { 2 }, ":1"

detectedGear1 = { GearInput_analog > 1.5 ? 1 : GearInput_analog > 2.5 ? 2 : GearInput_analog > 3.5 ? 3 : 4 }
"

Could you please guide us through this procedure? Would really appreciate it as we're both kinda green here :RTFM: :lol:
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Gear Indicator

Post by LT401Vette »

tmbryhn wrote:Hi!
I'm helping Red Racing with this gear indicator and we're trying to figure this out.3

This is what I have done so far:

"
[OutputChannels]
deadValue = { 0 } ; Convenient unchanging value.

GearInput_analog = { (adc6/1023)*5 }, "VOLT"
GearInput_analog_test = { 2 }, ":1"

detectedGear1 = { GearInput_analog > 1.5 ? 1 : GearInput_analog > 2.5 ? 2 : GearInput_analog > 3.5 ? 3 : 4 }
"

Could you please guide us through this procedure? Would really appreciate it as we're both kinda green here :RTFM: :lol:
I assume the goal is 1V = 1st gear, 2v=2nd, etc?
Looks good so far, but the > is backwards.

Try this:

Code: Select all

[PcVariables]
    gearDisplay = bits,   U08,  [0:2], "N", "1", "2", "3", "4", "5", "INVALID"
    


[FrontPage]

    indicator = {   gear %2   }, "Gear: bitStringValue( gearDisplay , detectedGear1  )",   "Gear: bitStringValue( gearDisplay , detectedGear1  )",         white, black, green, black     

[OutputChannels]
	GearInput_analog = { (adc6/1023)*5 }, "VOLT" 
	GearInput_analog_test = { 2 }, ":1"

	detectedGear1 = { GearInput_analog  >  1.5 ? 1 : GearInput_analog  >  2.5 ? 2 : GearInput_analog  >  3.5 ? 3 : 4 }

Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
tmbryhn
Helpful MS/Extra'er
Posts: 49
Joined: Sun Nov 06, 2011 6:27 am

Re: Gear Indicator

Post by tmbryhn »

Thanks!
I just copy/pasted and It's working! :yeah!:

... but, funny thing. The indicator won't refresh correct gear value before there are other changes in analog input variables, such as WB, CLT and IAT.
I can change and thrack the analog input value on adc6 and "Gear voltage" variable and notice that the voltage change in real time, but the indicator itself won't be updated before there have been another change in any of the above mentioned (and probably other) variables.

I have tried to set all the input lags to 100 (first thing that crossed my mind).

Any ideas?
Post Reply