Skip to content

Add support for Activator Pro models to Help Tech Braille driver. #16668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 17, 2024

Conversation

FelixGruetzmacher
Copy link
Contributor

@FelixGruetzmacher FelixGruetzmacher commented Jun 7, 2024

Link to issue number:

There is no corresponding issue.

Summary of the issue:

Help Tech Activator Pro 80 and Activator Pro 64 are not supported.

Description of user facing changes

The two affected device types will be supported by NVDA and will also be autodetected.

Description of development approach

The driver was modified to include the new devices.

Testing strategy:

The driver was tested in the context of the current beta of NVDA.

Known issues with pull request:

There are no known issues.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

Summary by CodeRabbit

  • New Features

    • Added support for Help Tech Activator Pro 64 and Activator Pro 80 Braille displays.
    • Introduced a notification feature for add-on updates after NVDA startup.
  • Documentation

    • Updated user documentation to reflect new Braille display support and add-on update notifications.

@FelixGruetzmacher FelixGruetzmacher requested a review from a team as a code owner June 7, 2024 10:31
@Adriani90
Copy link
Contributor

@FelixGruetzmacher thanks for this work. This will also need:

  • An entry in the changelog
  • Specific braille display documentation and key mappings documentation in the NVDA user guide (section 16.4 HandyTech braille displays)

@AppVeyorBot
Copy link

See test results for failed build of commit abb1d082b1

Felix Grützmacher added 2 commits June 7, 2024 13:26
…ted as it uses the blanket term `most Handy Tech displays` to define the set of supported devices. While this may suffice for the moment, a complete list will soon be added.
@AppVeyorBot
Copy link

See test results for failed build of commit 3d86cfba42

@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Jun 11, 2024
Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

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

Can you please update the user guide?

Additionally, this module is getting quite large. Would you consider splitting it up into a submodule like eurobraille and albatross in a separate PR?

@seanbudd seanbudd marked this pull request as draft June 11, 2024 03:54
FelixGruetzmacher and others added 5 commits June 13, 2024 10:15
…s the issue.

Co-authored-by: Leonard de Ruijter <3049216+LeonarddeR@users.noreply.github.com>
…y reference to `object` class.

Co-authored-by: Sean Budd <seanbudd123@gmail.com>
…d `super` syntax.

Co-authored-by: Sean Budd <seanbudd123@gmail.com>
@FelixGruetzmacher FelixGruetzmacher marked this pull request as ready for review June 13, 2024 11:26
@FelixGruetzmacher
Copy link
Contributor Author

Thank you for the comments. I cleaned up the code accordingly. Can we, just for the time being, leave this all in one module, and I'll split it up the next time it gets modified?

Copy link
Contributor

coderabbitai bot commented Jun 13, 2024

Walkthrough

The recent changes introduce support for new Braille display models, specifically the Activator Pro 64 and Activator Pro 80, by adding corresponding constants, mixins, and classes to handle dynamic cell adjustments and enhance the handling of protocol properties. The automatic detection mechanism and input stream handling logic have also been updated to accommodate these new models. Documentation has been updated to reflect these enhancements.

Changes

Files/Groups Change Summaries
source/brailleDisplayDrivers/handyTech.py Introduced Activator Pro 64 and Activator Pro 80 models, dynamic cell adjustment handling, and protocol properties updates.
user_docs/en/changes.md Updated Unicode CLDR, added new Braille features for Help Tech Activator Pro displays, and notification feature for add-on updates.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Software
    participant ActivatorPro
    participant DisplayDriver

    User->>Software: Connect ActivatorPro64/80
    Software->>+ActivatorPro: Identify Model
    ActivatorPro->>-Software: Return Model Info
    Software->>+DisplayDriver: Initialize with Model Details
    DisplayDriver-->>Software: Acknowledge
    Software->>Software: Adjust Dynamic Cells
    Software->>User: Display Braille
Loading
sequenceDiagram
    participant User
    participant NVDA
    participant AddOnManager

    User->>NVDA: Startup
    NVDA->>AddOnManager: Check for updates
    AddOnManager-->>NVDA: Notify for updates
    NVDA->>User: Display Update Notifications
Loading

Recent review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ad9ed73 and bc40464.

Files selected for processing (2)
  • source/brailleDisplayDrivers/handyTech.py (11 hunks)
  • user_docs/en/changes.md (1 hunks)
Additional context used
Path-based instructions (2)
source/brailleDisplayDrivers/handyTech.py (2)

Pattern **/*: Focus on code smells, logic errors, edge cases, missing test cases, security flaws and serious issues. Avoid commenting on minor issues such as linting, formatting and style issues. This project uses tabs instead of spaces, do not suggest usage of spaces over tabs. Are there any 'red flags' in this code that might warrant closer investigation from a security standpoint? Explain what makes them suspicious.


Pattern **/*.py: _, pgettext, ngettext, and ngettext are defined globally, errors for this being undefined can be ignored.

user_docs/en/changes.md (2)

Pattern **/*: Focus on code smells, logic errors, edge cases, missing test cases, security flaws and serious issues. Avoid commenting on minor issues such as linting, formatting and style issues. This project uses tabs instead of spaces, do not suggest usage of spaces over tabs. Are there any 'red flags' in this code that might warrant closer investigation from a security standpoint? Explain what makes them suspicious.


Pattern **/*.md: Focus on grammar, spelling, and punctuation. Also consider readability and clarity of contents. Ensure that changes follow the style of one sentence per line, suggest changes if this is not met.

Additional comments not posted (6)
source/brailleDisplayDrivers/handyTech.py (6)

113-114: Addition of new model constants for Activator Pro models.

This addition is necessary for supporting the new models as described in the PR overview. The constants are well-defined and follow the existing naming convention.


378-384: Implementation of ActiveSplitMixin for dynamic cell adjustment.

This mixin is crucial for supporting dynamic adjustment of braille cells, which is a feature of the new Activator Pro models. The use of HT_EXTPKT_NO_RECONNECT to prevent disconnect/reconnect activities during dynamic length adjustment is appropriate and aligns with the protocol requirements.


545-552: Introduction of new classes for Activator and Activator Pro models.

The new classes Activator and ActivatorPro are well-structured and inherit from the appropriate mixins and the base Model class. This setup ensures that all necessary functionalities are included and that the models can leverage shared behaviors through mixins.

Also applies to: 566-572


621-621: Addition of HT_PKT_OK_WITH_LENGTH constant.

The addition of this constant is necessary for handling packets with length information, which is important for the new models that might send variable-length data.


642-642: Addition of HT_EXTPKT_NO_RECONNECT constant.

Properly defined and necessary for handling the protocol's requirement to prevent unnecessary reconnections, which is especially important for dynamic cell adjustments in the new models.


691-692: Update to registerAutomaticDetection method to include new USB IDs.

The update to include new model IDs in the automatic detection logic is essential for ensuring that the new Activator Pro models are recognized and handled correctly by the driver.

Warning

Review ran into problems

Problems (1)
  • Git: Failed to clone repository. Please contact CodeRabbit support.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range and nitpick comments (1)
user_docs/en/changes.md (1)

24-25: Ensure consistency in bullet point formatting.

Consider adding a bullet point for the "By default, after NVDA startup, you will be notified if any add-on updates are available." to match the formatting of the other entries.

@@ -656,7 +709,7 @@ def registerAutomaticDetection(cls, driverRegistrar: bdDetect.DriverRegistrar):
"Braillino BL",
"Braille Wave BW",
"Easy Braille EBR",
"Activator AC",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this removal intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. The intent is to match Activator AC4/serial, Activator Pro 64/serial and Activator Pro 80/serial with a single condition.

Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

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

@seanbudd seanbudd merged commit 798e750 into nvaccess:master Jun 17, 2024
@FelixGruetzmacher
Copy link
Contributor Author

Might we get this into 2024.2?

@cary-rowen
Copy link
Contributor

No, because NVDA2024.2 has entered the RC stage. Mergers of new features will not be accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants