mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 11:12:35 +02:00
The tare and calibrate buttons on the Settings page queued commands
but never executed them due to four broken links:
1. Daemon received tare command via heartbeat but never called
scale.tare() — the ScaleReader was available in shared dict
but unused
2. No API endpoint for the daemon to report the new tare offset
back to the backend DB, so tare results were lost
3. Heartbeat updated config but never called
scale.update_calibration(), so ScaleReader kept initial values
4. The heartbeat response delivering the tare command still had
pre-tare values, immediately overwriting the new offset to zero
Added set-tare endpoint + API client method, and fixed heartbeat
loop to execute tare, persist the result, propagate calibration
changes to the ScaleReader, and skip calibration sync on the
heartbeat cycle that delivers a tare command.
Also replaced the calibration weight input with a touch-friendly
numpad since the RPi kiosk has no physical keyboard.