Fixed add endpoint

This commit is contained in:
Maximilian Giller 2024-05-02 18:29:44 +02:00
parent eac465e1a8
commit 5bc507f38a

View file

@ -63,9 +63,9 @@ async def add_weight(tl: int, tr: int, bl: int, br: int):
latest_values = [tl, tr, bl, br] latest_values = [tl, tr, bl, br]
tl = convert_to_weight(tl, zero_values[0], scale_values[0]) tl = convert_to_weight(tl, zero_values[0], scale_values[0])
tr = convert_to_weight(tl, zero_values[1], scale_values[1]) tr = convert_to_weight(tr, zero_values[1], scale_values[1])
bl = convert_to_weight(tl, zero_values[2], scale_values[2]) bl = convert_to_weight(bl, zero_values[2], scale_values[2])
br = convert_to_weight(tl, zero_values[3], scale_values[3]) br = convert_to_weight(br, zero_values[3], scale_values[3])
sum = tl + tr + bl + br sum = tl + tr + bl + br
add_line_to_history(f"{str(datetime.now())};{tl};{tr};{bl};{br};{sum};") add_line_to_history(f"{str(datetime.now())};{tl};{tr};{bl};{br};{sum};")