From 3f88a5e749603f63b488ecdbfc1356859044b514 Mon Sep 17 00:00:00 2001 From: muramura Date: Sat, 11 May 2024 17:38:39 +0900 Subject: [PATCH] Rover: Initialize variables --- Rover/Steering.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Rover/Steering.cpp b/Rover/Steering.cpp index 5253c2dfbe..5724c46976 100644 --- a/Rover/Steering.cpp +++ b/Rover/Steering.cpp @@ -10,10 +10,8 @@ void Rover::set_servos(void) motor_test_output(); } else { // get ground speed - float speed; - if (!g2.attitude_control.get_forward_speed(speed)) { - speed = 0.0f; - } + float speed = 0.0f; + g2.attitude_control.get_forward_speed(speed); g2.motors.output(arming.is_armed(), speed, G_Dt); }