fix: sweep settings and hw version update (#628)

* Remove privacy breaches from the HTML documentation

Icons and screenshots should not inform distant websites each time an
user reads readme.html.

The suggestions in this draft are independent and will probably be
discussed separately, but they affect a single file so for a first
review a single commit is convenient.

* fix: sweep settings and hw version update

NamedTuples are inmutable either use _replace or use the class itself.

* Revert "Remove privacy breaches from the HTML documentation"

---------

Co-authored-by: Nicolas Boulenguez <nicolas@debian.org>
pull/629/head
Henk Vergonet 2023-04-15 19:23:28 +02:00 committed by GitHub
parent 6eb24f2315
commit d09b55e1ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ class NanoVNA_V2(VNA):
sleep(WRITE_SLEEP)
# firmware major version of 0xff indicates dfu mode
if self.version.data["major"] == 0xFF:
if self.version.major == 0xFF:
raise IOError("Device is in DFU mode")
if "S21 hack" in self.features:

View File

@ -32,7 +32,7 @@ class SweepMode(Enum):
AVERAGE = 2
class Properties(NamedTuple):
class Properties:
name: str = ""
mode: "SweepMode" = SweepMode.SINGLE
averages: tuple[int, int] = (3, 0)