Creating Conditional Variables within ini files

This artical is meant for persons who may be making customizations to ini files to create or eliminate user options that will be
offered on the "Settings" Tab of the Project Properties dialog and New Projects Dialog. Typical interested parties
would consist of firmware developers or possibly power users.

Starting with TunerStudio 0.999.9 a [SettingGroups] is optionally supported.
The purpose of the [SettingGroups] section is to add settings groups that will show up on the Project Properties
and sections of the ini will be conditional based on the users selection.

For simple boolean conditions, the previous mechanism is still fine to use. For example adding a new setting of MY_CONDITION,
you can add that anywhere within the firmware ini file. There are 2 ways to add this boolean condition depending on
whether you want it to be on by default or off by default.

 

#set MY_CONDITION ; this will be true by default and show up as Active in Project Properties
#unset MY_CONDITION ; this will be false by default and show up as In-Active in Project Properties

Multi-value Conditions using [SettingGroups]

[SettingGroups] allow for more complex selection groups similar to those defined in the TunerStudio settingsConfig.xml file, and can even over-ride or remove the settings group that is defined there. This will allow for more control of the settings presented to the user at the firmware level.
[SettingGroups]
   ; the referenceName will over-ride previous, so if you are creating a 
   ; settingGroup with a reference name of lambdaSensor, it will replace the 
   ; setting group defined in the settingGroups.xml of the TunerStudio config
   ; folder. If is is an undefined referenceName, it will be added.
   ; keyword    =  referenceName,  DisplayName
   ; example 1 where the settingGroups.xml group lambdaSensor is over-ridden
   ; this would over-ride what is in the settingGroups.xml as it has the same
; referenceName as a group defined there
   settingGroup = lambdaSensor, "EGO Sensor Over-ride" 
settingOption = NARROW_BAND_EGO, "Narrow Band"
settingOption = DEFAULT, "WideBand" ; DEFAULT will be over looked and this will fall into the #else block of the statement.
   ;Example 2, new settingGroup to add a group.
   settingGroup = lambdaDisplay, "EGO Display - Over-ride"
settingOption = NARROW_BAND_O2, "Narrow Band"
settingOption = DEFAULT, "WideBand" ; DEFAULT will be over looked and this will fall into the #else block of the statement.
   ;Example 3 Over-ride settingGroup.xml to suppress an option group from displaying.
   settingGroup = lambdaSensor2, "EGO Sensor Additional"
settingOption = NARROW_BAND_EGO, "Narrow Band"
settingOption = DEFAULT, "WideBand" ; DEFAULT will be over looked and this will fall into the #else block of the statement.