From 2dfaeb118c68afd233c0d16ba5ad2837c4baaa40 Mon Sep 17 00:00:00 2001 From: superpenguin612 <74030080+superpenguin612@users.noreply.github.com> Date: Tue, 5 Nov 2024 21:05:03 -0500 Subject: [PATCH] floating point --- .../firmware/teensy_main/lib/lunabot_drivers/interfaces.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lunabot_embedded/firmware/teensy_main/lib/lunabot_drivers/interfaces.cpp b/lunabot_embedded/firmware/teensy_main/lib/lunabot_drivers/interfaces.cpp index 8d15d7bf..e0c06d3d 100644 --- a/lunabot_embedded/firmware/teensy_main/lib/lunabot_drivers/interfaces.cpp +++ b/lunabot_embedded/firmware/teensy_main/lib/lunabot_drivers/interfaces.cpp @@ -250,7 +250,7 @@ float HX711_Bus::read_scale(uint8_t id) { if (encs[id].is_ready()) { // since we could start with weight on the load cell, manually subtract zero point instead of // taring - float val = encs[id].read() - 8142300; + float val = encs[id].read() - 8142300F; // if load cell is not returning any data, but HX711 is connected if (val == 0) return -1;