Skip to content
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

Add get_firmware_version #233

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

bessman
Copy link
Collaborator

@bessman bessman commented Aug 19, 2024

Summary by Sourcery

Add functionality to retrieve the firmware version in the serial handler by introducing a new method get_firmware_version and a corresponding command GET_FW_VERSION in the protocol.

New Features:

  • Introduce a method get_firmware_version in the serial_handler.py to retrieve the firmware version as a tuple of major, minor, and patch numbers.

Enhancements:

  • Add a new command GET_FW_VERSION in protocol.py to support the firmware version retrieval functionality.

Copy link

sourcery-ai bot commented Aug 19, 2024

Reviewer's Guide by Sourcery

This pull request adds functionality to retrieve the firmware version of the PSLab device. It introduces a new method get_firmware_version() in the Handler class and updates the initialization process to store the firmware version. The changes also include adding a new command code for getting the firmware version in the protocol file.

File-Level Changes

Files Changes
pslab/serial_handler.py Added a new method get_firmware_version() to retrieve the firmware version as a tuple of integers (major, minor, patch)
pslab/serial_handler.py Updated the __init__ method to store the firmware version upon initialization
pslab/serial_handler.py Added error handling for devices with firmware versions older than 3.0.0
pslab/protocol.py Added a new command code GET_FW_VERSION in the protocol file
pslab/serial_handler.py Added from __future__ import annotations for forward reference support

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @bessman - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

pslab/serial_handler.py Show resolved Hide resolved
pslab/serial_handler.py Outdated Show resolved Hide resolved
@bessman bessman force-pushed the feat/firmware_version branch 2 times, most recently from 43fe8db to dd39d3d Compare August 22, 2024 12:45
@bessman bessman merged commit 3742998 into fossasia:development Aug 22, 2024
2 checks passed
@bessman bessman deleted the feat/firmware_version branch August 22, 2024 12:53
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.

1 participant