Skip to content

Commit

Permalink
fix: pass average_count onto read_average for multi-count reads
Browse files Browse the repository at this point in the history
  • Loading branch information
fivesixzero committed Apr 28, 2023
1 parent 41831e6 commit 4efc13f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hx711/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def read(self, average_count: int = 1) -> float:
:param int average_count: Number of reads to perform for average. Defaults to :const:`1`."""
if average_count > 1:
read_raw = (self.read_average() - self.offset) / self.scalar
read_raw = (self.read_average(average_count) - self.offset) / self.scalar
else:
read_raw = (self.read_raw() - self.offset) / self.scalar

Expand Down

0 comments on commit 4efc13f

Please sign in to comment.