v0.2.2.2 (#830)
This commit is contained in:
MartinNYHC
2026-03-27 09:27:47 +01:00
committed by GitHub
parent 8270030687
commit 67f91d94de
112 changed files with 18595 additions and 9993 deletions
+8 -2
View File
@@ -20,12 +20,18 @@ class ScaleReader:
self._last_raw = 0
try:
from scale_diag import NAU7802
from .nau7802 import NAU7802
self._scale = NAU7802()
self._scale.init()
self._ok = True
logger.info("Scale initialized (tare=%d, cal=%.6f)", tare_offset, calibration_factor)
bus_num = getattr(self._scale, "_bus_num", "?")
logger.info(
"Scale initialized on I2C bus %s (tare=%d, cal=%.6f)",
bus_num,
tare_offset,
calibration_factor,
)
except Exception as e:
logger.info("Scale not available: %s", e)