View Single Post
Old 01-21-2007, 04:54 PM   #69
sama
FLAC
sama's CarPC Specs
 
sama's Avatar
 
Join Date: Feb 2006
Location: London, UK
Vehicle: BMW 850CSi
Posts: 1,280
My Photos: ()
I've come up with a config file, which I'd like some input on, before I go on and code away to implement the features in there.

Most of it is explained within, but if anything is unclear, please let me know. It's by no means fully defined, but it does show the intended feaures.

I think the best way would be to imagine you were editing this, and see how intuitive (or not) it is, and what things are missing etc.

# Space Navigator PE Config File
#
#
# AXIS MODE DEFINITIONS
# ---------------------
# There are two modes that can be assigned to an axis, they are BINARY and PULSE.
#
#
#
# BINARY MODE
#
# syntax: binary, tirgger_threshold [float]
#
# tirgger_threshold : specifies how far you have to travel along the axis before an event is triggered.
#
# eg: PAN_X = binary, 0.1
#
#
#
# PULSE MODE
#
# syntax: pulse, tirgger_threshold [float], start_pulse_rate [integer], end_pulse_rate [integer], acceleration_mode [linear,exponential]
#
# tirgger_threshold : specifies how far you have to travel along the axis before an event is triggered.
#
# start_pulse_rate [integer] : once the threshold is reached, the pulse rate will be fired at the provided fequency (measured in Hz).
#
# end_pulse_rate [integer] this defines the pulse rate to fire at when the axis is flexed to its entire range
#
# acceleration_mode [linear,exponential] : the accelerating behaviour of the pulse rate increase, between the start and end of the above defined range.
#
#
#
#
# CONTEXTS
# --------
#
# Settings can live either in a global context, which means they'll be applicable all the time, or they can live in specific contexts.
# If a setting exists in both a global and a specific context, then the specific context setting will override the global context setting.
#
# It is possible to assign an action to switch context using the syntax:
#
# <action> = CONTEXT_SWITCH
#
# where the action can be a button press, or a gesture definition.
#
#
#
#
#
# ACTIONS
# -------
#
# These are defined in the following format:
#
# <action> = MAPPING
#
# The <action> can be an axis or a button name, or it can be a gesture. An axis must also define a + or a - sign following its name, to identify the
# intended direction. A + defines RIGHT for twisting/panning/tilting horizontally, UP for panning/tilting vertically, and PUSH for the vertical axis.
# A - is the opposite.
#
# Gestures are defined as a chain of axis or buttons, and times, seperated by pipes (|). The times define how long to wait before assuming the user has finished.
#
# For example:
#
# GESTURE: TWIST+ | 100 | TWIST-
#
# If the user is to twist the knob to the right, then witihin 100ms twists the knob left, then the action assigned to that gesture will be carried out.
# By that same token, if there are two gestures defined as follows:
#
# GESTURE: TWIST+ | 100 | TWIST-
#
# GESTURE: TWIST+ | 100 | TWIST- | 100 | VERTICAL+
#
# If the user gets to the TWIST- and within 100ms presses the VERTICAL axis, then the only the second gesture will be actioned. This is something to avoid however to reduce mis-gesturing!


[CONTEXT GLOBAL]
[AXIS]
PAN_X = binary, 0.1
PAN_Y = binary, 0.1
TILT_X = binary, 0.1
TILT_Y = binary, 0.1
TWIST = pulse, 0, 1, 50, exponential
VERTICAL = pulse, 0.1, 1, 1, linear
[END_AXIS]

[ACTIONS]
BUTTON_R = CONTEXT_SWITCH_UP
BUTTON_L = CONTEXT_SWITCH_DOWN
[END_ACTIONS]
[/CONTEXT]


[CONTEXT AUDIO]
[AXIS]
PAN_X = binary, 0.1
PAN_Y = pulse, 0.1, 1, 1, linear
TILT_X = binary, 0.1
TILT_Y = binary, 0.1
TWIST = pulse, 0, 1, 50, exponential
VERTICAL = pulse, 0.1, 1, 1, linear
[/AXIS]

[ACTIONS]
GESTURE: VERTICAL+ | 100ms | TWIST+ = CONTEXT_SWITCH_UP
GESTURE: VERTICAL+ | 100ms | TWIST- = CONTEXT_SWITCH_DOWN

VERTICAL+ = CMD: exec.exe PLAY
VERTICAL- = CMD: exec.exe STOP

PAN+ = CMD: exec.exe (what ever would scroll the play list up)
PAN- = CMD: exec.exe (what ever would scroll the play list down)
[/ACTIONS]
[/CONTEXT]


# This is used for GPS
[CONTEXT GPS]
[AXIS]
PAN_X = MOUSE_X
PAN_Y = MOUSE_Y
[/AXIS]
[ACTIONS]
TWIST = pulse, 0, 1, 50, exponential
[/ACTIONS]
[END_CONTEXT]
__________________
///Mputer - Velocity - TomTom - Vision - Bezel - CarPC

Last edited by sama : 01-21-2007 at 04:58 PM.
sama is offline   Reply With Quote