|Andrew Black 1a13cb7f06 Fix incorrect name; Add button event test||3 weeks ago|
|.hooks||1 month ago|
|bin||1 month ago|
|doc||1 month ago|
|res||3 weeks ago|
|src||3 weeks ago|
|sub||1 month ago|
|.clang-format||1 month ago|
|.ctags_extra_dirs||1 month ago|
|.gitignore||1 month ago|
|.gitmodules||1 month ago|
|Makefile||1 month ago|
|README.md||3 weeks ago|
SpaceLCD displays SVG images on the SpaceMouse Enterprise 3D mouse. It can also contol the LCD brightness.
SpaceLCD requires libusb to control the 3D mouse, librsvg to parse the SVG and also zlib to compress the images.
Clone the repository and build the library and Python module:
git clone --recursive https://github.com/TheHoodedFoot/spacelcd.git cd spacelcd/src make
Spacelcd needs write permissions for the SpaceMouse. There are some example udev rules included.
import spacelcd with open ("logo.svg", "r") as svgfile: svg=svgfile.readlines() spacelcd.svgtolcd(svg, spacelcd.scroll.left)
The SpaceMouse Enterprise has a 640x150 pixel display with 16-bit R5G6B5 colour support. Images are sent to the display with a 512-byte header, followed by the bitmap, which is compressed using raw deflate.
The official 3DConnexion driver has some support for animation, which is not currently understood and therefore not implemented here. The proprietary driver can also use partial screen updates, whereas SpaceLCD uploads the full screen each time.
SpaceLCD has only been tested using one SpaceMouse Enterprise, with USB ID 256f:c633, bought as part of the SpaceMouse Enterprise Kit 3DX-700058.
The header uses a 16-bit value to hold the length of the compressed bitmap, limiting its size to 65535 bytes.
Operating system support is currently GNU/Linux only.
The current version of spacenavd, 0.6, does not include the USB vendor and product ids for the SpaceMouse Enterprise, so although SpaceLCD can control the display, the device itself will not work as a 3d mouse. A patch for spacenavd is included here which adds the SpaceMouse Enterprise as a recognised device. The patch also blacklists the CadMouse, which is a regular mouse that comes as part of the SpaceMouse Enterprise kit, which spacenavd mistakenly recognises as a 3d mouse.
The SpaceMouse is vulnerable to corrupted data, which can cause the display to become unresponsive, requiring a hard reset. SpaceLCD will also generate corrupt data under certain circumstances, which is being investigated.
Because this code has only been developed on an x86 system, the endianness of 16-bit words has probably been taken for granted in several places, so it may work incorrectly on another architecture.
The code also includes a plugin for Inkscape version 1.0, which requires scour to be installed. The plugin uploads the current Inkscape drawing to the SpaceMouse, which is useful when prototyping GUI elements.
This project is licensed under the zlib License