Closed bessman closed 3 months ago
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.
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 |
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 commandGET_FW_VERSION
in the protocol.New Features:
get_firmware_version
in theserial_handler.py
to retrieve the firmware version as a tuple of major, minor, and patch numbers.Enhancements:
GET_FW_VERSION
inprotocol.py
to support the firmware version retrieval functionality.