Skip to content

Commit

Permalink
fixing taring
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanSST committed Mar 22, 2024
1 parent 92ae07e commit 541a677
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This code will run on a Raspberry PI in a chicken barn. There are scales under t
* write tests and mocks for mqtt client
* ping message to check scale
* endpoint to display state and messages
* endpoint to set current weight, box-state and chicken


## TODO List Arduino
Expand All @@ -22,6 +23,7 @@ This code will run on a Raspberry PI in a chicken barn. There are scales under t
* bugfix stati not appear on topic
* implement calibration
* pong message to confirm availability
* write header with message



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void tareAllBoxes() {

private void tareIfNeeded(String id) {
Box box = boxService.getBox(id);
if (Math.abs(box.getWeight()) > 5) {
if (Math.abs(box.getWeight()) > 5 && Math.abs(box.getWeight()) < 50) {
scaleService.tare(id);
} else {
log.info("No need to tare Scale {}, weight was {}.", id, box.getWeight());
Expand Down

0 comments on commit 541a677

Please sign in to comment.