mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-02-11 09:20:40 +00:00
fix: replace int() with round(float()) for core motor feedback
This commit is contained in:
@@ -216,7 +216,7 @@ class SerialRelay(Node):
|
|||||||
self.core_feedback.bno_accel.z = float(parts[5])
|
self.core_feedback.bno_accel.z = float(parts[5])
|
||||||
self.core_feedback.orientation = float(parts[6])
|
self.core_feedback.orientation = float(parts[6])
|
||||||
elif output.startswith("can_relay_fromvic,core,53"): #Rev motor feedback
|
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
|
temp = float(parts[4]) / 10.0
|
||||||
voltage = float(parts[5]) / 10.0
|
voltage = float(parts[5]) / 10.0
|
||||||
current = float(parts[6]) / 10.0
|
current = float(parts[6]) / 10.0
|
||||||
|
|||||||
Reference in New Issue
Block a user