aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2020-01-07 19:47:55 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2020-01-07 19:47:55 +0100
commit8e624e9919040e2ec99be764394bb33a2bc77fd9 (patch)
tree4b87a904b51158e5865af99d81c671e3dfc889db
parent96dc3bc0e0827eab2c37beb897577d3d0505ca33 (diff)
downloadrelabsd-8e624e9919040e2ec99be764394bb33a2bc77fd9.zip
relabsd-8e624e9919040e2ec99be764394bb33a2bc77fd9.tar.bz2
Seems to work fine with my space navigator.
The client <-> server logic is not implemeted yet, though.
-rw-r--r--conf/space_navigator.conf2
-rw-r--r--include/relabsd/device/physical_device.h2
-rw-r--r--src/config/parameters/parse_config_file.c17
-rw-r--r--src/device/physical/physical_device.c2
4 files changed, 14 insertions, 9 deletions
diff --git a/conf/space_navigator.conf b/conf/space_navigator.conf
index fe6a54c..9bda069 100644
--- a/conf/space_navigator.conf
+++ b/conf/space_navigator.conf
@@ -1,5 +1,5 @@
# 3DConnexion SpaceNavigator
-#to 100
+to 45
# AXIS MIN MAX FUZZ FLAT RESOLUTION OPTIONS
X -350 350 0 0 1 direct,real_fuzz
Y -350 350 0 0 1 direct,real_fuzz
diff --git a/include/relabsd/device/physical_device.h b/include/relabsd/device/physical_device.h
index babf911..9bee391 100644
--- a/include/relabsd/device/physical_device.h
+++ b/include/relabsd/device/physical_device.h
@@ -48,5 +48,5 @@ int relabsd_physical_device_get_file_descriptor
struct libevdev * relabsd_physical_device_get_libevdev
(
- struct relabsd_physical_device device [const restrict static 1]
+ const struct relabsd_physical_device device [const restrict static 1]
);
diff --git a/src/config/parameters/parse_config_file.c b/src/config/parameters/parse_config_file.c
index c01090d..00e9d4c 100644
--- a/src/config/parameters/parse_config_file.c
+++ b/src/config/parameters/parse_config_file.c
@@ -82,23 +82,24 @@ static int read_axis_options
break;
case ',':
- i = 0;
- option[i] = '\n';
+ option[i] = '\0';
/* We parsed a new option and there is a least another. */
(void)
relabsd_axis_enable_option_from_name(option, axis_name, axis);
+ i = 0;
+
break;
case '\n':
- option[i] = '\n';
+ option[i] = '\0';
(void)
relabsd_axis_enable_option_from_name(option, axis_name, axis);
return 1;
case EOF:
- option[i] = '\n';
+ option[i] = '\0';
(void)
relabsd_axis_enable_option_from_name(option, axis_name, axis);
@@ -181,7 +182,7 @@ static int parse_timeout_configuration_line
relabsd_parameters_set_timeout(timeout_msec, parameters);
- return 0;
+ return 1;
}
/*
@@ -203,7 +204,11 @@ static int parse_axis_configuration_line
if (axis_index == RELABSD_UNKNOWN)
{
- if (RELABSD_IS_PREFIX("TO", axis_name))
+ if
+ (
+ RELABSD_IS_PREFIX("TO", axis_name)
+ || RELABSD_IS_PREFIX("to", axis_name)
+ )
{
return parse_timeout_configuration_line(file, parameters);
}
diff --git a/src/device/physical/physical_device.c b/src/device/physical/physical_device.c
index 52d58dc..24c73af 100644
--- a/src/device/physical/physical_device.c
+++ b/src/device/physical/physical_device.c
@@ -225,7 +225,7 @@ int relabsd_physical_device_get_file_descriptor
struct libevdev * relabsd_physical_device_get_libevdev
(
- struct relabsd_physical_device device [const restrict static 1]
+ const struct relabsd_physical_device device [const restrict static 1]
)
{
return device->libevdev;