This README describes the contents of this dir and their file structure.

Last Edited, Nov 17th 19:39 PM

Inside this dir (RealtimeMaps) are files with an .rtv_map extension.  They
are ASCII text files in .ini file format, using the common "section", 
"key", and "value" layout as shown below.

[section]
key=value

The rtv_map files define all of the "derived" variables from the RAW data
coming back from the ECU.  The derived variables are setup 1 per section.
see below for descriptions of the various keys.

NOTES regarding the files:

1. The value names are CaSe SeNsItIvE, so be warned.  Ironically the
keys themselves are not, as the string compare functions are case insensitive.

2. There is no limit to the number of keys that you can bind to a widget.

3. Most commonly used keys are:
	applicable_firmwares (string) comma sepertated list of firmware names
			(from interrogation profiles) that this realtime map 
			is applicable to.  This is a new addition, after
			version 0.6.3. This prevents having 3 different rtmaps
			for a firmware family when the only thing changed is
			the firmware name, not the API. ONLY FOUND in the 
			[realtime_map] section
	raw_list	(string) List of "internal_names" that are choices 
			to be shown in the user controlled outputs on the
			spark variants firmware. Only derived variables that
			depend DIRECTLY on a SINGLE raw variable should be 
			here,  things like high res RPM or sparkangle can
			NOT be here as they depend on multiple inputs. ONLY
			FOUND in hte [realtime_map] section.
	keys		(string) list of keys, comma seperated to be loaded
			by the main loading routine. (NOTE: not all keys in
			the section are listed on this line.  keys specifc to
			complex conversions and depend_on are loaded by
			specialized handlers.
	internal_names	(CSV string) list of names for this variable 
			internally to megatunix
			used by the datalogger, loogviewer and Dashboard.
	dlog_gui_name	(string) Name shown on datalogging tab
	dlog_field_name	(string) name in datalog header for this variable
	log_by_default	(boolean) If TRUE it gets checked by default in the 
			datalogging tab
	offset		(integer) offset in bytes from the beginning of 
			the raw vars block of data from the ECU.
	precision	(int) number of significant digits
	dl_conv_expr	(string) see next line
	ul_conv_expr	(string)  A string representation of a mathematical
			expression. (something like x*60)  X is the value in
			the raw data from the ECU at the offset above.
			the "ul_" means "upload (on read from ECU) the "dl_"
			means download (before sending TOO the ECU) the dl_
			lines are used for sending data to the ECU regarding
			the user controllable outputs in the spark firmwares.
			NOTE: This should be an INTEGER expression,  use of
			decimal points is NOT allowed as they get mangled in
			locales that use comma's instead of periods.  For 
			expressions that require floating point convert as 
			follows. i.e. x*0.352 becomes x*(352/1000).
	complex_expr	(bool) If complex, call a handler that looks for the 
			following:
	expr_symbols	(string) comma seperated list of variable names used
			in the complex expression
	expr_types	(enum list) comma seperated list of enumerated types
			used to determine which keys to search for
NOTE regarding complex_conversions:
expr_symbols gives an ARBRITRATY list of names,  you can use whatever
you want, just make sure you have all the necessary keys in there.
The number of keys per variable varies based on the variable type 
which is what it's marked as in expr_types. 
expr_types an contain one of three choices. 
 1. _VE_VAR_, meaning VE variable, which requires a page/offset 
 to resolve it. 
 2. _VE_EMB_BIT_, meaning VE_embedded bit, which requires page,offset,
  and bitmask to resolve completely
 3. _RAW_VAR_ meaning a raw variable, which only requires an offset to
 resolve.
The expr_types in combination of expr_symbols determine what following
keys will be present in the section.  If expr_symbols contains "cyls,reqfuel"
and expr_types contains "_VE_EMB_BIT_,_VE_VAR_" then the following fields will
be searched for. "cyls_page","cyls_offset","cyls_bitmask",
"reqfuel_page" and "reqfuel_offset". 
	
	*_page		(integer) page in ecu that this control refers to
	*_offset	(integer) offset from the beginning of said page that
			this control refers to. 
	*_bitmask	(integer) the bitmask of bitval..

	lookuptable	(string) String name of the lookuptable to use to
			convert the raw value to a real world value.  The
			raw_Value is the INDEX into the lookuptable array.
	alt_lookuptable	(string) alternate lookuptable used if the depend_on
			conditions are met.
	depend_on	(string) list of arbritrary names of variables to
			match against to use an alternate lookuptable.
			The depend_on key is a CSV list of named to look for
			to gather the required info about each dependancy.
			i.e. depend_on=o2_sensor.  The MUST be a key called
			o2_sensor=  with either 7 or 4 parameters depending if
			its a VE_EMB_BIT or VE_VAR respectively. 
			for example:
		depend_on=some_value
		some_value=_VE_EMB_BIT_,_U08_,0,100,8,3,1
		Field 1 is the type (_VE_EMB_BIT_, or _VE_VAR_)
		Field 2 is the size (_U08_ _U16_, _U32_, Use _U08_ if unsure)
		Field 3 is the page of this dependancy
		Field 4 is the offset of this dependancy
		Field 5 (EMB_BIT) is the bitMASK
		Field 6 (EMB_BIT) is the bitSHIFT
		Field 7 (EMB_BIT) is the bitVALUE that we are looking for.
		
	*_type		(enum) Type of variable (VE_VAR or VE_EMB_BIT)
	*_page		(integer) Page in ve_vars
	*_offset	(integer) Offset in ve_vars
	*_bitmask	(integer) bitmask to mask value at page,offset
	*_bitval	(integer) value to match against for above 4 params

NOTE on "depend_on":
	depend_on is used for derived values that use a lookuptable that can
be switched in the ECU based on some user setting,  This functionality is 
here so that what the user sees is what the ECU is using,  You can bind one
or multiple controls so that when they all evaluate to true (i.e. the bitval
you set in the map matches the state of that bitfield in the copy of ECU ram
then the alternate lookuptable will be used.) Common controls that use this
are NBo2/WBo2 choices, and 115kpa/250kpa map sensors...

