From 384c2d36632ef04983178db68d81385b18ca1d18 Mon Sep 17 00:00:00 2001 From: Anatoly Scherbakov Date: Thu, 14 May 2026 20:50:44 +0200 Subject: [PATCH 1/2] Fix GMC-800 history flash size --- pygmc/devices/gmc800.py | 2 ++ tests/test_gmc800.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/pygmc/devices/gmc800.py b/pygmc/devices/gmc800.py index 0bff571..a812ff6 100644 --- a/pygmc/devices/gmc800.py +++ b/pygmc/devices/gmc800.py @@ -41,3 +41,5 @@ def __init__( # listed as RFC1201 in https://www.gqelectronicsllc.com/GMC-800UserGuide.pdf # https://www.gqelectronicsllc.com/forum/topic.asp?TOPIC_ID=10394 # The device uses a non-published spec. + + self._flash_memory_size_bytes = 2**21 # 2 MiB diff --git a/tests/test_gmc800.py b/tests/test_gmc800.py index d7c1af5..88c3c2a 100644 --- a/tests/test_gmc800.py +++ b/tests/test_gmc800.py @@ -70,6 +70,7 @@ # Use our fake/mock connection in our real device class mock_device = devices.DeviceSpec404(mock_connection) +mock_gmc800 = devices.GMC800(port=None, connection=mock_connection) @pytest.mark.parametrize("cmd,expected", parametrize_data) @@ -98,6 +99,10 @@ def test_reset_buffers(capfd): assert "reset_buffers" in out +def test_gmc800_flash_memory_size(): + assert mock_gmc800._flash_memory_size_bytes == 2**21 + + # uSv Tests config_calib0 = { "Calibration_CPM_1": 100, From 20ec87f9f5948bc4bbdd144e6a9c3b241aa2ea00 Mon Sep 17 00:00:00 2001 From: Anatoly Scherbakov Date: Tue, 26 May 2026 19:57:25 +0200 Subject: [PATCH 2/2] Add Anatoly Scherbakov to contributors --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bf70d7e..6805af2 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ df = pd.DataFrame(history[1:], columns=history[0]) - [Thomaz](https://github.com/Wikilicious) - [Huy](https://github.com/huyndao) +- [Anatoly Scherbakov](https://github.com/anatoly-scherbakov) ### Notes - Alternative Python projects for GQ GMC: