Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pygmc/devices/gmc800.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions tests/test_gmc800.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down