Skip to content

Conversation

@ilouzl
Copy link
Contributor

@ilouzl ilouzl commented Jul 7, 2025

solves #20

@ilouzl ilouzl requested review from Copilot and odedtap July 8, 2025 12:50
@ilouzl ilouzl self-assigned this Jul 8, 2025

This comment was marked as outdated.

@ilouzl ilouzl requested a review from Copilot September 1, 2025 16:20
Copy link

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 refactors the inputmodes module to replace the monolithic TapInputMode class with dedicated classes for each input mode and introduces dedicated raw sensors sensitivity enums. The refactoring improves type safety and API design by using explicit classes and enums instead of string-based mode selection.

  • Replaces TapInputMode with dedicated classes: InputModeText, InputModeController, InputModeControllerText, and InputModeRaw
  • Introduces new enums for raw sensor sensitivities: FingerAcclSensitivity, ImuGyroSensitivity, and ImuAcclSensitivity
  • Updates the raw data parser to use scale factors instead of boolean scaling with sensitivity arrays

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tapsdk/inputmodes.py Complete refactor replacing TapInputMode with dedicated classes and RawSensorsSensitivity helper
tapsdk/enumerations.py Adds new sensitivity enums for finger accelerometer, IMU gyro, and IMU accelerometer
tapsdk/parsers.py Updates raw_data_msg to use scale factors instead of boolean scaling with sensitivity arrays
tapsdk/tap.py Updates to use new input mode classes and improved raw data handling
tests/test_inputmodes.py Updates tests to use new input mode classes and sensitivity enums
tests/test_parsers.py Updates parser tests to use new scale factors approach
tapsdk/__init__.py Updates imports to expose new input mode classes
examples/basic.py Updates example to use new input mode classes and sensitivity enums
Readme.md Updates documentation to reflect new API with input mode classes and sensitivity enums

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ilouzl ilouzl merged commit 86e4acf into develop Sep 1, 2025
9 checks passed
@ilouzl ilouzl deleted the 20-make-tapinputmode-a-enum-like-inputtype branch September 1, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants