Skip to content

Commit

Permalink
Retrieve old weight, if the weight is to high.
Browse files Browse the repository at this point in the history
  • Loading branch information
graphefruit committed May 7, 2024
1 parent 7a65e40 commit ed2b2dd
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2902,7 +2902,12 @@ export class BrewBrewingGraphComponent implements OnInit {
if (scaleType === ScaleType.LUNAR) {
if (weight > 5000) {
// Wrong scale values reported. - Fix it back
weight = oldWeight;
if (this.flowProfileTempAll.length > 0) {
const lastEntry = this.flowProfileTempAll.slice(-1);
weight = lastEntry[0].weight;
} else {
weight = oldWeight;
}
} else {
if (weight <= 0) {
if (this.flowProfileTempAll.length >= 3) {
Expand Down

0 comments on commit ed2b2dd

Please sign in to comment.