diff --git a/api/scaffold/iso7816.py b/api/scaffold/iso7816.py index d909276..152dc02 100644 --- a/api/scaffold/iso7816.py +++ b/api/scaffold/iso7816.py @@ -20,6 +20,7 @@ from enum import Enum from scaffold import Pull from typing import Tuple, List, Union, Optional +from packaging.version import parse as parse_version from . import Scaffold import requests import crcmod @@ -283,7 +284,7 @@ def __init__(self, scaffold: Scaffold = None): # resistor if hardware version is >= 1.1. For version 1.0, the pull-up # resistor must be soldered on the daughterboard. # 1.0 hardware version boards have <= 0.3 architecture version. - if scaffold.version >= "0.3": + if scaffold.version >= parse_version("0.3"): scaffold.d0.pull = Pull.UP scaffold.d0 << scaffold.iso7816.io_out scaffold.d0 >> scaffold.iso7816.io_in diff --git a/api/setup.py b/api/setup.py index bd09740..4c69b88 100755 --- a/api/setup.py +++ b/api/setup.py @@ -26,7 +26,7 @@ setup( name="donjon-scaffold", - version="0.9.1", + version="0.9.2", author="Olivier Heriveaux", description="Python3 API for the Scaffold board", long_description=long_description,