Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed hardware version check in iso7816 #25

Merged
merged 1 commit into from
Nov 20, 2024
Merged
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
3 changes: 2 additions & 1 deletion api/scaffold/iso7816.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion api/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading