From 48b0f7e1f967e80193476c0ea1c22eebc5f45a34 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 31 May 2025 01:05:11 +0000 Subject: [PATCH] fix: replace int() with round(float()) for core motor feedback --- src/core_pkg/core_pkg/core_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_pkg/core_pkg/core_node.py b/src/core_pkg/core_pkg/core_node.py index a9afb0f..1768293 100644 --- a/src/core_pkg/core_pkg/core_node.py +++ b/src/core_pkg/core_pkg/core_node.py @@ -216,7 +216,7 @@ class SerialRelay(Node): self.core_feedback.bno_accel.z = float(parts[5]) self.core_feedback.orientation = float(parts[6]) elif output.startswith("can_relay_fromvic,core,53"): #Rev motor feedback - motorId = int(parts[3]) + motorId = round(float(parts[3])) temp = float(parts[4]) / 10.0 voltage = float(parts[5]) / 10.0 current = float(parts[6]) / 10.0