|
Revision 1.3 – 28th
Dec 2012 UPDD Settings |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The driver’s settings are held in the registry (Windows) and a settings file, tbupdd.ini
Setting file notesFile locationThe settings file is managed by the driver and must always be located
in the same folder as the active copy of tbupddwu.exe (or the parent folder
on 64 bit systems). Settings file backupsSince version 4.1.6, build 1422 the system periodically takes backups of the settings file in the format Tbupdd.ini.bak.date-time, e.g. Tbupdd.ini.bak.20100821-010703 When the settings file is opened the driver checks for validity and if this check fails it references the backup files until a valid setting file is found. This was implemented to overcome corrupted files due to power outage corrupting open files in very specific system configurations. The backup files are deleted once they are greater than 3 days old. Updating the settingsThe are numerous ways to update the driver settings:
Example Setting updatesThis section highlights a number of useful setting that control some of the more common function and features that are not exposed via the UPDD Console. Some UPDD functions have specific UPDD API calls but other functions are simply controlled by the value of a setting in the settings file. If, as a programmer using the UPDD API, there is no obvious API call to implement a desired function it may be possible to invoke the function simply by changing the file setting and applying the change using call TBApiApply or TBApiApplyNoReload as appropriate. Other examples, when using TButils to update the settings, can be found here. Touch packet filtersIn some circumstances it may be desirable to not process the initial touch packets but to filter them out either based on packet count or time threshold. In a few cases dealing with some very old touch controllers we noticed that the first few data packets did not carry the correct x and y co-ordinate as the controller took a few packets to ‘zero’ in on the point of touch. In this instance we were able to set the TouchDownFilter setting to discard the number of inaccurate packets. In another case we had a customer using a projected capacitive controller in an environment where the ambient electrical noise was causing the touch controller to generate the occasional random touch when the touch screen was not in use. We implemented a touch filter based on touch duration so that the driver will ignore any touches less than specified touch threshold. In the examples below the driver would filter out the first 3 data packets and ignore touches less than 100ms in duration:
Touch clicks onlySome applications or system users do not want to generate motion when the touch device is in use. Touch pointer motion is determined by the controller setting Motion being set being disabled (0) or enabled (1)
Show system trayTo enable or disable the system tray icons set the general setting ‘Show systray’ to 0 (disable) or 1 (enable).
Enable or Disable a deviceTo enable or disable a device set the controller setting ‘Enabled’ to 0 (disable) or 1 (enable), passing the Device Handle of the device.
Set UPDD languageUPDD implements its own language system and translation files are supplied for various languages and new ones are easily implemented via the language tool. This means that the UPDD can display its own language within its dialogues irrespective of the system’s locale (assuming code pages are available to display the characters). To enable a specific language use the TBApiSetSettingSZ call to set the bundle registry key ‘Language’ to a language value; i.e. FR = French, EN = English, JP = Japanese, ES = Spanish, DE = German, IT = Italian etc. Settings API callsThere are a number of generic API function calls to set and retrieve entries in the settings file. See the individual calls for more information.
Some of these API's perform special processing that may be extended in future releases. For example, for TBApiSetSettingSZEx, if the aName argument is set to "Calibration Style" and aSubtree equals "", the indicated style (in argument aSZ) is activated. e.g. for calibration styles - use aSubTree = "" to emulate the "non-extended" versions
The following example shows the settings that make up a typical UPDD sub-section:
TBUPDD.ini file [UPDD]\Parameters\1\Number Of Calibration Styles - item count [UPDD]\Parameters\1\Calibration Style - active item name [UPDD]\Parameters\1\Calibration Styles\0\Calibration Style - item name [UPDD]\Parameters\1\Calibration Styles\0\... - other item data
These calls work exactly the same in all OS environments. Ad hoc settingsSome pointer devices have certain characteristics or functions that are not utilised by UPDD but may require settings to be held by UPDD that relate to these characteristics. These settings, which are not used by UPDD, are stored in the settings file as device-specific configuration details to allow retrieval via the API if required. Application programs may need to retrieve these settings. For example, a program using a digitizer tablet may need to lookup device characteristics, such as the device width in inches. In this case UPDD will be shipped with preset values in: [UPDD\Parameters\n\Ad Hoc Settings] where n is the device number. This entry holds a semi-colon separated list of device specific settings in the following format: VALUE NAME;VALUE TYPE;SETTING[crlf]VALUE NAME;VALUE TYPE;SETTING [crlf]… Where:
Using the VALUE NAME and VALUE TYPE it is possible to enumerate through the actual registry settings (if they are unknown) by calling either TBApiGetSettingSZ (for string values) or TBApiGetSettingDWORD (hex values) for each VALUE NAME. Note that the SETTING shown may match the actual registry entry but it is safer to access the latter as this may have been changed (under application control) from the factory settings. However, to make life easier, an API call is available which will enumerate through any ad hoc settings, - see TBApiEnumAdhocValues for more details. Example of ad hoc settings:Registry value “Ad Hoc Settings” could contain: AHOrigin_X;S;Lower Left[crlf]AHOrigin_Y;S;Lower Left[crlf]AHCTX_ORG_X;X;14[crlf]AHCTX_ORG_Y;X;14 The actual setting values are:
AHOrigin_X = Lower Left (string) AHOrigin_Y = Lower Left (string) AHCTX_ORG_X = 14 (hex) AHCTX_ORG_Y = 14 (hex) Note: If ad hoc settings have been defined for a device, the settings can be viewed using the UPDDDEMO demonstration program or directly in the tbupdd.ini file. Conventionally, all ad hoc settings are prefixed ‘AH’. ContactFor further information or technical assistance please email the technical support team at technical@touch-base.com. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||