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,