Add VectorBridge (16d0:1474) + generic ABS NDOF fallback

pull/126/head
Cosmic-Layers 2025-10-17 14:46:49 -07:00
rodzic df7a61e9eb
commit 52b225612f
2 zmienionych plików z 14 dodań i 7 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
/*
spacenavd - a free software replacement driver for 6dof space-mice.
Copyright (C) 2007-2025 John Tsiombikas <nuclear@mutantstargoat.com>
Copyright (C) 2007-2022 John Tsiombikas <nuclear@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
@ -62,9 +62,9 @@ static struct usbdb_entry {
int (*bnmap)(int); /* remap buttons on problematic devices */
} usbdb[] = {
{{0x046d, 0xc603}, DEV_PLUSXT, 0, 0}, /* spacemouse plus XT */
{{0x046d, 0xc605}, DEV_CADMAN, DF_SWAPYZ | DF_INVYZ, 0}, /* cadman */
{{0x046d, 0xc605}, DEV_CADMAN, 0, 0}, /* cadman */
{{0x046d, 0xc606}, DEV_SMCLASSIC, 0, 0}, /* spacemouse classic */
{{0x046d, 0xc621}, DEV_SB5000, DF_SWAPYZ | DF_INVYZ, 0}, /* spaceball 5000 */
{{0x046d, 0xc621}, DEV_SB5000, 0, 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,8 @@ static struct usbdb_entry {
{{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) */
{{0x16d0, 0x1474}, DEV_SNAV, 0, 0}, /* cosmiclayers vectorbridge */
{{-1, -1}, DEV_UNKNOWN, 0}
};
@ -96,7 +97,6 @@ static int devid_blacklist[][2] = {
{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(?) */

Wyświetl plik

@ -1,6 +1,6 @@
/*
spacenavd - a free software replacement driver for 6dof space-mice.
Copyright (C) 2007-2025 John Tsiombikas <nuclear@mutantstargoat.com>
Copyright (C) 2007-2022 John Tsiombikas <nuclear@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
@ -37,6 +37,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "client.h"
#define DEF_MINVAL (-500)
#ifndef TEST_BIT
/* helper to test bits in the EVIOCGBIT() byte-masks */
#define TEST_BIT(bit, array) (((array)[(bit) / 8] >> ((bit) % 8)) & 1)
#endif
#define DEF_MAXVAL 500
#define DEF_RANGE (DEF_MAXVAL - DEF_MINVAL)
@ -164,7 +169,7 @@ int open_dev_usb(struct device *dev)
/* Wireless devices use the same dongle, try to guess which actual
* device this is, and apply the button hack if it's a SpcMouse Pro
*/
if(dev->num_buttons > 2) {
if(dev->num_buttons >= 255) {
dev->type = DEV_SMPROW;
dev->bnhack = bnhack_smpro;
dev->num_buttons = bnhack_smpro(-1);
@ -290,6 +295,8 @@ static int read_evdev(struct device *dev, struct dev_input *inp)
}
if(rdbytes > 0) {
inp->tm = iev.time;
switch(iev.type) {
case EV_REL:
inp->type = INP_MOTION;