Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev-cal' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
james-e-morris committed Dec 4, 2021
2 parents a6d48d5 + 2569a7b commit c959c0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hx711_multi/hx711.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,11 @@ def run_calibration(self, known_weights: List[float] = [], readings_to_average:
calculated_multiples = [1]
if len(calculated_multiples) > 1:
multiples_stdev = round(stdev(calculated_multiples), 0)
weight_multiple = round(mean(calculated_multiples), 1)
weight_multiple = mean(calculated_multiples)
else:
multiples_stdev = 0
weight_multiple = round(calculated_multiples[0], 1)
print_str = f'Scale ratio with {len(weights_known)} samples: {weight_multiple} | stdev = {multiples_stdev}'
weight_multiple = calculated_multiples[0]
print_str = f'Scale ratio with {len(weights_known)} samples: {round(weight_multiple,1)} | stdev = {multiples_stdev}'
self._logger.debug(print_str)
print(print_str) # print for user as well for better user experience when prompting
self._adcs[adc_index]._weight_multiple = weight_multiple
Expand Down

0 comments on commit c959c0a

Please sign in to comment.