Skip to content

Created mouse_inputs.py#4

Open
quantum9Innovation wants to merge 1 commit intoMIT-Assistive-Technology:serverfrom
tigestd:patch-1
Open

Created mouse_inputs.py#4
quantum9Innovation wants to merge 1 commit intoMIT-Assistive-Technology:serverfrom
tigestd:patch-1

Conversation

@quantum9Innovation
Copy link
Copy Markdown
Collaborator

So far, tracks motion on SpaceMouse - currently accounting for all x, y, z directional motion (including rotations, and "yaw", "pitch", and "roll" motions, which is a cool 3D rotation axis). Very basic at the moment

So far, tracks motion on SpaceMouse - currently accounting for all x, y, z directional motion (including rotations, and "yaw", "pitch", and "roll" motions, which is a cool 3D rotation axis). Very basic at the moment
@quantum9Innovation quantum9Innovation added the enhancement New feature or request label Apr 27, 2025
@quantum9Innovation quantum9Innovation self-assigned this Apr 27, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new module, mouse_inputs.py, that tracks motion from a SpaceMouse device by interpreting x, y, z translations along with pitch, yaw, and roll rotations.

  • Added functionality to read and interpret 13-byte data packets from the SpaceMouse input device.
  • Implements basic console output for movement and rotation direction tracking.
Comments suppressed due to low confidence (1)

mouse_inputs.py:23

  • Typo detected: 'reciever' should be corrected to 'receiver'.
Caveat: Spacemouse must be plugged in via USB - data is "hidden" via bluetooth AND the reciever unfortunately

bluetooth AND the reciever unfortunately
"""

if len(data) < 7:
Copy link

Copilot AI Apr 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data length check is insufficient: the function expects 13-byte data but only verifies a minimum of 7 bytes, which may lead to index errors.

Suggested change
if len(data) < 7:
if len(data) < 13:

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants