John Tsiombikas
1cf333777b
minor style changes in the dropsu branch.
...
probably will never be merged as it currently stands though.
2022-01-29 09:50:20 +02:00
Thomas Martens
3d369aaa7f
Added user/group informations to README.md and to the example-spnavrc.
2022-01-29 09:15:23 +02:00
Thomas Martens
b842f3c0b5
Added support for run the daemon under other user privileges.
...
When the daemon was started as root (f.e. vi systemd unit),
some users had to issue the "xhost +" command for some programms
(f.e. FreeCad).
With this support, spacenavd can started as root and switch on runtime
to an other uid / gid. So a "xhost +" command isn't longer neccessary
when proper uid or gid settings are used (f.e. the "standard" user of
the system).
With the invoked uid / gid spacenavd stills open the pid and socket file
and also use it for device dection.
Also implemented user/group configfile setting.
2022-01-29 09:11:17 +02:00
John Tsiombikas
58bc16dd0c
minor C89-compliance and code style fixes in dev_usb_freebsd.c
2022-01-29 08:41:49 +02:00
John Tsiombikas
9f0870ed51
Merge branch 'freebsdusb'
2022-01-29 08:21:46 +02:00
Stephen Hurd
9c5976d41c
Merge branch 'master' into freebsd-port
2022-01-29 01:05:22 -05:00
Stephen Hurd
02a9806b9d
Open uhid device non-blocking
...
The main loop is driven by the read function returning -1. If we
always return 0, processing gets stuck.
2022-01-29 00:54:24 -05:00
John Tsiombikas
d56c0e502c
Merge pull request #53 from RealDeuce/fix-no-x11-warning
...
Add warning suppression when --disable-x11 is used
2022-01-29 07:53:59 +02:00
John Tsiombikas
2a86295910
Merge pull request #52 from RealDeuce/silence_xtest_warning
...
Declare use_xtest in #ifdef HAVE_XTEST_H
2022-01-29 07:51:40 +02:00
Stephen Hurd
4cc34b78fe
Return event for every message
...
Previously, translation and rotation events were only returned when
the axis value changed. This causes issues when the space mouse is
held still in a movment position.
Now, every message received via USB is translated to events for the
daemon to handle.
2022-01-28 23:35:02 -05:00
Stephen Hurd
8d3ab7e514
Add warning suppression when --disable-x11 is used
2022-01-28 14:03:34 -05:00
Stephen Hurd
d0469c5fb6
Add -I/usr/local/include to cpp flags
...
On FreeBSD, X11 headers are in /usr/local/include/X11, not
/usr/include/X11. since -I/usr/local/include is added to CFLAGS
in Makefile.in, the test should also include that.
This allows FreeBSD to properly test XInput2 and XTest headers.
2022-01-28 13:56:34 -05:00
Stephen Hurd
8cdfa0c282
Fix some glaring style inconsistences.
2022-01-28 13:32:30 -05:00
Stephen Hurd
1b3d9770fe
Fix warning silencing declaration name
2022-01-28 13:28:34 -05:00
Stephen Hurd
5f91c9c107
Declare use_xtest in #ifdef HAVE_XTEST_H
...
Prevents harmless unused variable warning.
2022-01-28 13:27:05 -05:00
Stephen Hurd
f94c344a75
Silent warning for hotplug as well.
2022-01-28 13:26:24 -05:00
Stephen Hurd
e4d1cdfd15
Change warning silencer hack to more appropriate name
2022-01-28 13:24:20 -05:00
Stephen Hurd
1b5cd4538a
Add missing globfree() call
2022-01-28 13:23:30 -05:00
Stephen Hurd
794a6b8e1a
Remove unused #defines
2022-01-28 13:19:26 -05:00
Stephen Hurd
4fd3dc3c13
Remove change missed during rebase
2022-01-28 13:18:17 -05:00
Stephen Hurd
9506c0e295
Address feedback
2022-01-28 13:16:26 -05:00
Stephen Hurd
dafaf8c4c7
Handle battery charge level message
2022-01-28 13:09:59 -05:00
Stephen Hurd
a5c51ded53
Default to /usr/local/etc/spnavrc for FreeBSD
...
/etc is for things that ship as part of the system.
2022-01-28 13:09:59 -05:00
Stephen Hurd
2ad357f13c
Add support for devices that send all 6 axes in report 1
2022-01-28 13:09:59 -05:00
Stephen Hurd
d90fa571ea
Use AXES instead of MAX_AXES for hard-coded number of axes.
2022-01-28 13:09:59 -05:00
Stephen Hurd
8bb892b5a1
Initial FreeBSD port
...
Only tested with SP1 USB
Hard-codes a bunch of the HID stuff, ignoring the descriptor completely
2022-01-28 13:09:56 -05:00
John Tsiombikas
83b6124188
- take CC environment variable into account when building
...
- use cp and mkdir in the install rule instead of using the install
utility
2022-01-28 19:34:43 +02:00
Stephen Hurd
ccafde465a
Ignore SIGPIPE
...
Fixes issue where spacenavd would terminate when Blender was closed.
2022-01-28 18:49:11 +02:00
John Tsiombikas
c370884e65
configure script improvements:
...
- provide feedback for dependency checking
- warn about building without xtest support
- eliminate redundant check_header invocations for the same file
Closes github issue #50
2022-01-23 09:16:20 +02:00
John Tsiombikas
9f748d16fe
Added mechanism to bind buttons to actions.
...
Currently implemented actions: sensitivity up/down/reset.
2021-09-23 23:38:22 +03:00
John Tsiombikas
c5288167d1
- always respect the -l <logfile> argument regardless of whether we
...
start daemonized or not.
- converted a bunch of printfs in the recently added dev_serial.c to
logmsg calls.
2021-07-15 13:53:58 +03:00
John Tsiombikas
4c503c2d1d
Merge branch 'xtest'
2021-06-24 21:35:05 +03:00
John Tsiombikas
80e1eab670
XTEST improvements
...
- test for presence of the XTest.h header file in configure and
conditionally compile XTEST support
- check for availability of the XTEST extension when connecting to the
X server, and fallback to the old XSendEvent code if it's not
available.
- fix formatting and code style issues with the original patch
2021-06-24 21:32:17 +03:00
Gaël Écorchard
d79a2e36d0
Use XTestFakeKeyEvent to send keys
...
Using XTestFakeKeyEvent rather than XSendEvent makes Shift, Control and
Alt working. The Escape key was working also with XSendEvent. Other keys
were not tested.
2021-06-24 21:11:54 +03:00
John Tsiombikas
c408cbeaa9
Merge branch 'startup_led_off_fix'
2021-05-23 00:46:49 +03:00
John Tsiombikas
6bd07cf0f6
added comments to clarify the toggling of the LED state on startup issue
2021-05-23 00:44:41 +03:00
John Tsiombikas
6972066793
Merge branch 'led_off' of git://github.com/gebner/spacenavd into startup_led_off_fix
2021-05-23 00:37:58 +03:00
John Tsiombikas
4060531a2b
cleaned up the log output when detecting USB devices
2021-05-23 00:36:26 +03:00
Gabriel Ebner
fbf9019470
Turn off LED on startup if LED_OFF is set.
2021-05-22 13:45:20 +02:00
John Tsiombikas
fc6ba4e7a5
Merge pull request #38 from stephank/patch-1
...
Fix Darwin build
2021-05-18 18:53:15 +03:00
Stéphan Kochen
d6a25d5c3f
Fix Darwin build
2021-05-18 14:03:11 +02:00
John Tsiombikas
7e14d4892e
serial magellan: using the specified 2 stop bits seem to cause PL2303
...
USB-serial UARTs to misbehave. 1 stop bit seems to work fine, so we'll
go with that. Fixes github bug #35 .
2021-05-04 18:25:11 +03:00
John Tsiombikas
d3a3aa017a
Fixed bug in configure script which failed to detect and set the version
...
string, when executed outside of the git working directory. Closes
github issue #29
2020-12-01 22:23:17 +02:00
John Tsiombikas
3b2eeb011f
print usage information when encountering invalid arguments, and also
...
accept -help and --help as aliases of -h.
2020-11-16 08:14:26 +02:00
John Tsiombikas
e88d9dbe85
while enqueuing events, the new serial code failed to properly push
...
over the read end of the queue on overflow.
2020-11-16 08:09:38 +02:00
John Tsiombikas
18ae3074a4
Removed references to the log and logfile configuration options from the
...
example spnavrc file. These were changed into the `-l` commandline
argument some time ago. Closes issue #27 .
2020-11-15 02:33:38 +02:00
John Tsiombikas
d330773cae
fixed missing zero terminator when trying to determine if the serial
...
device is a spaceball by looking for the "\r@1" substring.
2020-11-10 19:41:22 +02:00
John Tsiombikas
486645527f
merged the new serial device code, and deleted libsball and the old
...
inactive magellan code.
2020-11-10 01:01:25 +02:00
John Tsiombikas
26c840da63
build: improved the dependency genration method
2020-11-07 07:08:40 +02:00
John Tsiombikas
11a43b8be5
Merge pull request #23 from counterfactual-regret-minimization/master
...
Point spacenavd.service at new binary location
2020-03-12 15:03:08 +02:00