This commit is contained in:
parent
a2ac482336
commit
7ea93408d2
1 changed files with 6 additions and 2 deletions
|
|
@ -204,8 +204,12 @@ class INA228: # noqa: PLR0904
|
||||||
counts = [1, 4, 16, 64, 128, 256, 512, 1024]
|
counts = [1, 4, 16, 64, 128, 256, 512, 1024]
|
||||||
if count not in counts:
|
if count not in counts:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Invalid averaging count: {count}. "
|
"Invalid averaging count: "
|
||||||
f"Valid values are: {', '.join(map(str, counts))}."
|
+ str(count)
|
||||||
|
+ ". "
|
||||||
|
+ "Valid values are: "
|
||||||
|
+ ", ".join(map(str, counts))
|
||||||
|
+ "."
|
||||||
)
|
)
|
||||||
self._avg_count = counts.index(count)
|
self._avg_count = counts.index(count)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue