Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package spacenavd for openSUSE:Factory 
checked in at 2024-08-25 12:10:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/spacenavd (Old)
 and      /work/SRC/openSUSE:Factory/.spacenavd.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "spacenavd"

Sun Aug 25 12:10:38 2024 rev:13 rq:1195834 version:1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/spacenavd/spacenavd.changes      2024-02-23 
16:46:33.778020379 +0100
+++ /work/SRC/openSUSE:Factory/.spacenavd.new.2698/spacenavd.changes    
2024-08-25 12:10:55.353341267 +0200
@@ -1,0 +2,16 @@
+Thu Aug 22 19:29:13 UTC 2024 - Herbert Graeber <herb...@graeber-clan.de>
+
+- Version 1.3
+  * Support for dominant axis mode. Dominant axis toggle can be bound as
+    a button action.
+  * Fixed device detection for some serial Spaceballs which were misdetected
+    due to spurious data arriving before the "@reset".
+  * Normalized default axis mapping/sign for CadMan USB and Spaceball 5000 USB.
+  * Linux: stop using the evdev time field, which was dropped in 32bit linux
+    for year 2038 compatibility.
+  * Protocol: added missing set/get requests for the repeat interval.
+  * Updated device blacklists to ignore 3Dconnexion keyboards/mice.
+  * Build improvements and fixes for various platforms.
+- Add libXext as a build requires
+
+-------------------------------------------------------------------

Old:
----
  spacenavd-1.2.tar.gz

New:
----
  spacenavd-1.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ spacenavd.spec ++++++
--- /var/tmp/diff_new_pack.DFskWd/_old  2024-08-25 12:10:55.829361021 +0200
+++ /var/tmp/diff_new_pack.DFskWd/_new  2024-08-25 12:10:55.829361021 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           spacenavd
-Version:        1.2
+Version:        1.3
 Release:        0
 Summary:        Daemon for 3Dconnexion devices
 License:        GPL-3.0-or-later
@@ -33,6 +33,7 @@
 BuildRequires:  pkgconfig
 BuildRequires:  systemd-rpm-macros
 BuildRequires:  pkgconfig(x11)
+BuildRequires:  pkgconfig(xext)
 %{?systemd_requires}
 Requires:       xdpyinfo
 Supplements:    modalias(usb:v046DpC603d*dc*dsc*dp*ic*isc*ip*)

++++++ spacenavd-1.2.tar.gz -> spacenavd-1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/.github/workflows/build_freebsd.yml 
new/spacenavd-1.3/.github/workflows/build_freebsd.yml
--- old/spacenavd-1.2/.github/workflows/build_freebsd.yml       2022-12-11 
20:27:43.000000000 +0100
+++ new/spacenavd-1.3/.github/workflows/build_freebsd.yml       2024-06-03 
03:25:18.000000000 +0200
@@ -8,13 +8,13 @@
 jobs:
   build:
 
-    runs-on: macos-12
+    runs-on: ubuntu-22.04
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
 
     - name: FreeBSD build
-      uses: vmactions/freebsd-vm@v0
+      uses: vmactions/freebsd-vm@v1
       with:
         prepare: |
           pkg install -y git gmake libX11 libXi libXtst
@@ -24,7 +24,7 @@
           gmake
           gmake DESTDIR=spacenavd-freebsd install
 
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: spacenavd-freebsd
         path: spacenavd-freebsd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/.github/workflows/build_gnulinux.yml 
new/spacenavd-1.3/.github/workflows/build_gnulinux.yml
--- old/spacenavd-1.2/.github/workflows/build_gnulinux.yml      2022-12-11 
20:27:43.000000000 +0100
+++ new/spacenavd-1.3/.github/workflows/build_gnulinux.yml      2024-06-03 
03:25:18.000000000 +0200
@@ -11,7 +11,7 @@
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
 
     - name: install dependencies
       run: |
@@ -27,7 +27,7 @@
     - name: stage install
       run: DESTDIR=spacenavd-gnulinux make install
 
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: spacenavd-gnulinux
         path: spacenavd-gnulinux
@@ -37,7 +37,7 @@
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
 
     - name: configure
       run: ./configure --disable-x11
@@ -48,7 +48,7 @@
     - name: stage install
       run: DESTDIR=spacenavd-gnulinux-nox11 make install
 
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: spacenavd-gnulinux-nox11
         path: spacenavd-gnulinux-nox11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/.github/workflows/build_macosx.yml 
new/spacenavd-1.3/.github/workflows/build_macosx.yml
--- old/spacenavd-1.2/.github/workflows/build_macosx.yml        2022-12-11 
20:27:43.000000000 +0100
+++ new/spacenavd-1.3/.github/workflows/build_macosx.yml        2024-06-03 
03:25:18.000000000 +0200
@@ -11,7 +11,7 @@
     runs-on: macos-latest
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
 
     - name: install dependencies
       run: |
@@ -26,7 +26,7 @@
     - name: stage install
       run: DESTDIR=spacenavd-macosx make install
 
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: spacenavd-macosx
         path: spacenavd-macosx
@@ -36,7 +36,7 @@
     runs-on: macos-latest
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
 
     - name: configure
       run: ./configure --disable-x11
@@ -47,7 +47,7 @@
     - name: stage install
       run: DESTDIR=spacenavd-macosx-nox11 make install
 
-    - uses: actions/upload-artifact@v3
+    - uses: actions/upload-artifact@v4
       with:
         name: spacenavd-macosx-nox11
         path: spacenavd-macosx-nox11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/Makefile.in 
new/spacenavd-1.3/Makefile.in
--- old/spacenavd-1.2/Makefile.in       2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/Makefile.in       2024-06-03 03:25:18.000000000 +0200
@@ -9,8 +9,8 @@
 
 CC ?= gcc
 CFLAGS = $(warn) $(dbg) $(opt) -fno-strict-aliasing -fcommon \
-                -I$(srcdir)/src -I/usr/local/include -MMD $(add_cflags)
-LDFLAGS = -L/usr/local/lib $(xlib) $(add_ldflags) -lm
+                -I$(srcdir)/src $(xinc) -MMD $(add_cflags)
+LDFLAGS = $(xlib) $(add_ldflags) -lm
 
 $(bin): $(obj)
        $(CC) -o $@ $(obj) $(LDFLAGS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/configure new/spacenavd-1.3/configure
--- old/spacenavd-1.2/configure 2022-12-11 21:00:13.000000000 +0100
+++ new/spacenavd-1.3/configure 2024-06-07 12:13:07.000000000 +0200
@@ -28,7 +28,7 @@
 check_header() {
        printf "Looking for header: $1 ... " >&2
        echo "#include <$1>" >.chkhdr.c
-       if cpp -I/usr/local/include .chkhdr.c >/dev/null 2>&1; then
+       if cpp -I/usr/local/include $x11inc .chkhdr.c >/dev/null 2>&1; then
                echo found >&2
                echo "#define HAVE_`basename $1 | tr '[:lower:]' '[:upper:]' | 
sed 's/\./_/g'`"
        else
@@ -44,7 +44,7 @@
 X11=yes
 HOTPLUG=yes
 XINPUT=yes
-VER=1.2
+VER=1.3
 CFGDIR=/etc
 
 if [ -z "$VER" ]; then
@@ -138,6 +138,8 @@
 
 HAVE_ALLOCA_H=`check_header alloca.h`
 HAVE_MALLOC_H=`check_header malloc.h`
+HAVE_STDINT_H=`check_header stdint.h`
+HAVE_INTTYPES_H=`check_header inttypes.h`
 
 if [ "$X11" = "no" ]; then
        echo "WARNING: you have disabled the X11 interface, the resulting 
daemon \
@@ -145,6 +147,22 @@
 daemon (3dxserv)!"
        echo
 else
+       # find alternate X11 header/lib paths
+       if [ -e /usr/local/include/X11/Xlib.h ]; then
+               x11prefix='/usr/local'
+       elif [ -e /usr/X11/include/X11/Xlib.h ]; then
+               x11prefix='/usr/X11'
+       elif [ -e /usr/X11R6/include/X11/Xlib.h ]; then
+               x11prefix='/usr/X11R6'
+       elif [ -e /opt/homebrew/include/X11/Xlib.h ]; then
+               x11prefix='/opt/homebrew'
+       fi
+       if [ -n "$x11prefix" ]; then
+               echo "X11 prefix: $x11prefix"
+               x11inc=-I$x11prefix/include
+               x11lib=-L$x11prefix/lib
+       fi
+
        HAVE_XINPUT2_H=`check_header X11/extensions/XInput2.h`
        HAVE_XTEST_H=`check_header X11/extensions/XTest.h`
 
@@ -169,13 +187,16 @@
 fi
 
 if [ "$X11" = 'yes' ]; then
-       echo 'xlib = -L/usr/X11/lib -lX11' >>Makefile
+       echo "xinc = $x11inc" >>Makefile
+       echo "xlib = $x11lib" >>Makefile
+
        if [ -n "$HAVE_XINPUT2_H" ]; then
                echo 'xlib += -lXi' >>Makefile
        fi
        if [ -n "$HAVE_XTEST_H" ]; then
                echo xlib += -lXtst >>Makefile
        fi
+       echo 'xlib += -lX11 -lXext' >>Makefile
 fi
 
 if [ -n "$CFLAGS" ]; then
@@ -209,6 +230,8 @@
 # check for alloca.h
 [ -n "$HAVE_ALLOCA_H" ] && echo $HAVE_ALLOCA_H >>$cfgheader
 [ -n "$HAVE_MALLOC_H" ] && echo $HAVE_MALLOC_H >>$cfgheader
+[ -n "$HAVE_STDINT_H" ] && echo $HAVE_STDINT_H >>$cfgheader
+[ -n "$HAVE_INTTYPES_H" ] && echo $HAVE_INTTYPES_H >>$cfgheader
 [ -n "$HAVE_XINPUT2_H" ] && echo $HAVE_XINPUT2_H >>$cfgheader
 [ -n "$HAVE_XTEST_H" ] && echo $HAVE_XTEST_H >>$cfgheader
 echo >>$cfgheader
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/doc/example-spnavrc 
new/spacenavd-1.3/doc/example-spnavrc
--- old/spacenavd-1.2/doc/example-spnavrc       2022-12-11 20:27:43.000000000 
+0100
+++ new/spacenavd-1.3/doc/example-spnavrc       2024-06-03 03:25:18.000000000 
+0200
@@ -85,6 +85,7 @@
 #    sensitivity-up, sensitivity-down, sensitivity-reset
 #    disable-rotation
 #    disable-translation
+#    dominant-axis
 #
 #bnact16 = sensitivity-up
 #bnact17 = sensitivity-down
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/cfgfile.c 
new/spacenavd-1.3/src/cfgfile.c
--- old/spacenavd-1.2/src/cfgfile.c     2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/src/cfgfile.c     2024-06-03 03:25:18.000000000 +0200
@@ -690,6 +690,7 @@
        {"sensitivity-reset", BNACT_SENS_RESET},
        {"disable-rotation", BNACT_DISABLE_ROTATION},
        {"disable-translation", BNACT_DISABLE_TRANSLATION},
+       {"dominant-axis", BNACT_DOMINANT_AXIS},
        {0, 0}
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/cfgfile.h 
new/spacenavd-1.3/src/cfgfile.h
--- old/spacenavd-1.2/src/cfgfile.h     2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/src/cfgfile.h     2024-06-03 03:25:18.000000000 +0200
@@ -39,6 +39,7 @@
        BNACT_SENS_DEC,
        BNACT_DISABLE_ROTATION,
        BNACT_DISABLE_TRANSLATION,
+       BNACT_DOMINANT_AXIS,
 
        MAX_BNACT
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/dev.c new/spacenavd-1.3/src/dev.c
--- old/spacenavd-1.2/src/dev.c 2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/src/dev.c 2024-06-03 03:25:18.000000000 +0200
@@ -62,9 +62,9 @@
        int (*bnmap)(int);              /* remap buttons on problematic devices 
*/
 } usbdb[] = {
        {{0x046d, 0xc603}, DEV_PLUSXT,          0,                              
                0},                             /* spacemouse plus XT */
-       {{0x046d, 0xc605}, DEV_CADMAN,          0,                              
                0},                             /* cadman */
+       {{0x046d, 0xc605}, DEV_CADMAN,          DF_SWAPYZ | DF_INVYZ,   0},     
                        /* cadman */
        {{0x046d, 0xc606}, DEV_SMCLASSIC,       0,                              
                0},                             /* spacemouse classic */
-       {{0x046d, 0xc621}, DEV_SB5000,          0,                              
                0},                             /* spaceball 5000 */
+       {{0x046d, 0xc621}, DEV_SB5000,          DF_SWAPYZ | DF_INVYZ,   0},     
                        /* spaceball 5000 */
        {{0x046d, 0xc623}, DEV_STRAVEL,         DF_SWAPYZ | DF_INVYZ,   0},     
                        /* space traveller */
        {{0x046d, 0xc625}, DEV_SPILOT,          DF_SWAPYZ | DF_INVYZ,   0},     
                        /* space pilot */
        {{0x046d, 0xc626}, DEV_SNAV,            DF_SWAPYZ | DF_INVYZ,   0},     
                        /* space navigator */
@@ -80,7 +80,7 @@
        {{0x256f, 0xc633}, DEV_SMENT,           DF_SWAPYZ | DF_INVYZ,   
bnhack_sment},  /* spacemouse enterprise */
        {{0x256f, 0xc635}, DEV_SMCOMP,          DF_SWAPYZ | DF_INVYZ,   0},     
                        /* spacemouse compact */
        {{0x256f, 0xc636}, DEV_SMMOD,           DF_SWAPYZ | DF_INVYZ,   0},     
                        /* spacemouse module */
-
+       {{0x256f, 0xc63a}, DEV_SMW,                     DF_SWAPYZ | DF_INVYZ,   
0},                             /* spacemouse wireless (Bluetooth) */
        {{-1, -1}, DEV_UNKNOWN, 0}
 };
 
@@ -90,6 +90,14 @@
 static int devid_blacklist[][2] = {
        {0x256f, 0xc650},       /* cadmouse */
        {0x256f, 0xc651},       /* cadmouse wireless */
+       {0x256f, 0xc654},       /* CadMouse Pro Wireless */
+       {0x256f, 0xc655},       /* CadMouse Compact */
+       {0x256f, 0xc656},       /* CadMouse Pro */
+       {0x256f, 0xc657},       /* CadMouse Pro Wireless Left */
+       {0x256f, 0xc658},       /* CadMouse Compact Wireless */
+       {0x256f, 0xc664},       /* Keyboard Pro */
+       {0x256f, 0xc668},       /* Keyboard Pro (newer version)*/
+       {0x256f, 0xc665},       /* Numpad Pro */
        {0x256f, 0xc62c},       /* lipari(?) */
        {0x256f, 0xc641},       /* scout(?) */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/dev_serial.c 
new/spacenavd-1.3/src/dev_serial.c
--- old/spacenavd-1.2/src/dev_serial.c  2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/src/dev_serial.c  2024-06-03 03:25:18.000000000 +0200
@@ -1,6 +1,6 @@
 /*
 spacenavd - a free software replacement driver for 6dof space-mice.
-Copyright (C) 2007-2021 John Tsiombikas <nucl...@member.fsf.org>
+Copyright (C) 2007-2023 John Tsiombikas <nucl...@member.fsf.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -106,6 +106,8 @@
 static void enqueue_motion(struct sball *sb, int axis, int val);
 static void gen_button_events(struct sball *sb, unsigned int prev);
 
+static char *memstr(char *buf, int len, const char *str);
+
 
 int open_dev_serial(struct device *dev)
 {
@@ -147,7 +149,7 @@
 
        write(fd, "\r@RESET\r", 8);
 
-       if((sz = read_timeout(fd, buf, sizeof buf - 1, 2000000)) > 0 && 
(buf[sz] = 0, strstr(buf, "@1"))) {
+       if((sz = read_timeout(fd, buf, sizeof buf - 1, 2000000)) > 0 && 
memstr(buf, sz, "@1")) {
                /* we got a response, so it's a spaceball */
                make_printable(buf, sz);
                logmsg(LOG_INFO, "Spaceball detected: %s\n", buf);
@@ -184,6 +186,8 @@
 
                /* set 3D mode, not-dominant-axis, pass through motion and 
button packets */
                write(fd, "m3\r", 3);
+               /* also attempt the compress mode-set command with extended 
keys enabled */
+               write(fd, "c3B\r", 4);
 
                sb->parse = mag_parsepkt;
                return 0;
@@ -604,7 +608,7 @@
        if(strstr(verstr, "MAGELLAN")) {
                dev->type = DEV_SM;
                strcpy(dev->name, "Magellan SpaceMouse");
-               return 9; /* magellan spacemouse */
+               return 11; /* magellan spacemouse (assume ext buttons on 
plus/xt) */
        }
 
        if(strstr(verstr, "SPACEBALL")) {
@@ -717,3 +721,14 @@
                bit <<= 1;
        }
 }
+
+static char *memstr(char *buf, int len, const char *str)
+{
+       int i, slen = strlen(str);
+       for(i=0; i<len - slen; i++) {
+               if(memcmp(buf + i, str, slen) == 0) {
+                       return buf + i;
+               }
+       }
+       return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/dev_usb.c 
new/spacenavd-1.3/src/dev_usb.c
--- old/spacenavd-1.2/src/dev_usb.c     2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/src/dev_usb.c     2024-06-03 03:25:18.000000000 +0200
@@ -15,6 +15,8 @@
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/dev_usb_linux.c 
new/spacenavd-1.3/src/dev_usb_linux.c
--- old/spacenavd-1.2/src/dev_usb_linux.c       2022-12-11 20:27:43.000000000 
+0100
+++ new/spacenavd-1.3/src/dev_usb_linux.c       2024-06-03 03:25:18.000000000 
+0200
@@ -290,8 +290,6 @@
        }
 
        if(rdbytes > 0) {
-               inp->tm = iev.time;
-
                switch(iev.type) {
                case EV_REL:
                        inp->type = INP_MOTION;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/dummy_usb.c 
new/spacenavd-1.3/src/dummy_usb.c
--- old/spacenavd-1.2/src/dummy_usb.c   2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/src/dummy_usb.c   2024-06-03 03:25:18.000000000 +0200
@@ -31,10 +31,6 @@
        return 0;
 }
 
-void free_usb_devices_list(struct usb_dev_info *list)
-{
-}
-
 int open_dev_usb(struct device *dev)
 {
        return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/event.c 
new/spacenavd-1.3/src/event.c
--- old/spacenavd-1.2/src/event.c       2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/src/event.c       2024-06-03 03:25:18.000000000 +0200
@@ -1,6 +1,6 @@
 /*
 spacenavd - a free software replacement driver for 6dof space-mice.
-Copyright (C) 2007-2022 John Tsiombikas <nucl...@member.fsf.org>
+Copyright (C) 2007-2023 John Tsiombikas <nucl...@member.fsf.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
 #include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include "event.h"
 #include "client.h"
 #include "proto_unix.h"
@@ -56,7 +57,8 @@
 
 static struct dev_event *dev_ev_list = NULL;
 
-static int disable_translation, disable_rotation;
+static int disable_translation, disable_rotation, dom_axis_mode;
+static int cur_axis_mag[6], cur_dom_axis;
 
 
 static struct dev_event *add_dev_event(struct device *dev)
@@ -148,9 +150,9 @@
  */
 void process_input(struct device *dev, struct dev_input *inp)
 {
-       int sign, axis;
+       int sign, axis, abs_val;
        struct dev_event *dev_ev;
-       float sens_rot, sens_trans;
+       float sens_rot, sens_trans, axis_sens;
        spnav_event ev;
 
        switch(inp->type) {
@@ -160,7 +162,9 @@
                ev.axis.value = inp->val;
                broadcast_event(&ev);
 
-               if(abs(inp->val) < cfg.dead_threshold[inp->idx] ) {
+               abs_val = abs(inp->val);
+
+               if(abs_val < cfg.dead_threshold[inp->idx] ) {
                        inp->val = 0;
                }
                if((axis = map_axis(inp->idx)) == -1) {
@@ -170,8 +174,17 @@
 
                sens_rot = disable_rotation ? 0 : cfg.sens_rot[axis - 3];
                sens_trans = disable_translation ? 0 : cfg.sens_trans[axis];
+               axis_sens = axis < 3 ? sens_trans : sens_rot;
 
-               inp->val = (int)((float)inp->val * cfg.sensitivity * (axis < 3 
? sens_trans : sens_rot));
+               if(dom_axis_mode && axis < 6) {
+                       if(abs_val > cur_axis_mag[cur_dom_axis]) {
+                               cur_dom_axis = axis;
+                       } else {
+                               inp->val = 0;
+                       }
+                       cur_axis_mag[axis] = abs_val;
+               }
+               inp->val = (int)((float)inp->val * cfg.sensitivity * axis_sens);
 
                dev_ev = device_event_in_use(dev);
                if(verbose && dev_ev == NULL)
@@ -281,6 +294,9 @@
                        disable_rotation = 0;
                }
                break;
+       case BNACT_DOMINANT_AXIS:
+               dom_axis_mode = !dom_axis_mode;
+               break;
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/event.h 
new/spacenavd-1.3/src/event.h
--- old/spacenavd-1.2/src/event.h       2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/src/event.h       2024-06-03 03:25:18.000000000 +0200
@@ -88,7 +88,6 @@
 
 struct dev_input {
        int type;
-       struct timeval tm;
        int idx;
        int val;
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/proto.h 
new/spacenavd-1.3/src/proto.h
--- old/spacenavd-1.2/src/proto.h       2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/src/proto.h       2024-06-03 03:25:18.000000000 +0200
@@ -1,7 +1,13 @@
 #ifndef PROTO_H_
 #define PROTO_H_
 
+#include "config.h"
+
+#ifdef HAVE_STDINT_H_
 #include <stdint.h>
+#elif defined(HAVE_INTTYPES_H_)
+#include <inttypes.h>
+#endif
 
 /* maximum supported protocol version */
 #define MAX_PROTO_VER  1
@@ -83,6 +89,8 @@
        REQ_GCFG_GRAB,                  /* get device grabbing:         R[0] 
state R[6] status */
        REQ_SCFG_SERDEV,                /* set serial device path:      Q[0-5] 
next 24 bytes Q[6] remaining length - R[6] status */
        REQ_GCFG_SERDEV,                /* get serial device path:      R[0-5] 
next 24 bytes R[6] remaining length or -1 for failure */
+       REQ_SCFG_REPEAT,                /* set repeat interval:         Q[0] 
interval (msec) - R[6] status */
+       REQ_GCFG_REPEAT,                /* get repeat interval:         R[0] 
interval (msec) R[6] status */
        /* TODO ... more */
        REQ_CFG_SAVE = 0x3ffe,  /* save config file:        R[6] status */
        REQ_CFG_RESTORE,                /* load config from file:   R[6] status 
*/
@@ -170,7 +178,9 @@
        "SCFG_GRAB",
        "GCFG_GRAB",
        "SCFG_SERDEV",
-       "GCFG_SERDEV"
+       "GCFG_SERDEV",
+       "SCFG_REPEAT",
+       "GCFG_REPEAT"
 };
 
 const int spnav_reqnames_1000_size = sizeof spnav_reqnames_1000 / sizeof 
*spnav_reqnames_1000;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/proto_unix.c 
new/spacenavd-1.3/src/proto_unix.c
--- old/spacenavd-1.2/src/proto_unix.c  2022-12-11 20:27:43.000000000 +0100
+++ new/spacenavd-1.3/src/proto_unix.c  2024-06-03 03:25:18.000000000 +0200
@@ -34,6 +34,9 @@
 #include "kbemu.h"
 #endif
 
+#ifndef isfinite
+#define isfinite(x)    (!isnan(x))
+#endif
 
 static int lsock = -1;
 
@@ -612,6 +615,16 @@
                spnav_send_str(c->sock, req->type, cfg.serial_dev);
                break;
 
+       case REQ_SCFG_REPEAT:
+               cfg.repeat_msec = req->data[0];
+               sendresp(c, req, 0);
+               break;
+
+       case REQ_GCFG_REPEAT:
+               req->data[0] = cfg.repeat_msec;
+               sendresp(c, req, 0);
+               break;
+
        case REQ_CFG_SAVE:
                sendresp(c, req, write_cfg(cfgfile, &cfg));
                break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spacenavd-1.2/src/xdetect.c 
new/spacenavd-1.3/src/xdetect.c
--- old/spacenavd-1.2/src/xdetect.c     1970-01-01 01:00:00.000000000 +0100
+++ new/spacenavd-1.3/src/xdetect.c     2024-06-03 03:25:18.000000000 +0200
@@ -0,0 +1,44 @@
+/*
+spacenavd - a free software replacement driver for 6dof space-mice.
+Copyright (C) 2007-2023 John Tsiombikas <nucl...@member.fsf.org>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* this must be the inverse of all the other xdetect_*.c ifdefs */
+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__APPLE__)
+#include <sys/select.h>
+#include "xdetect.h"
+
+int xdet_start(void)
+{
+       return -1;
+}
+
+void xdet_stop(void)
+{
+}
+
+int xdet_get_fd(void)
+{
+       return -1;
+}
+
+int handle_xdet_events(fd_set *rset)
+{
+       return -1;
+}
+#else
+int spacenav_xdetect_none_shut_up_empty_source_warning;
+#endif

Reply via email to