From d56bc5c9df49e0f4fca5c417057e3b5dcefdea72 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 26 Jan 2003 20:20:33 +0000 Subject: [PATCH] If the gyro becomes unserviceable, stop spinning immediately. --- src/Instrumentation/gyro.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Instrumentation/gyro.cxx b/src/Instrumentation/gyro.cxx index 3cb5b3152..93fee30be 100644 --- a/src/Instrumentation/gyro.cxx +++ b/src/Instrumentation/gyro.cxx @@ -26,6 +26,8 @@ Gyro::update (double delta_time_sec) double step = 0.25 * _power_norm * delta_time_sec; if ((_spin_norm + step) <= _power_norm) _spin_norm += step; + } else { + _spin_norm = 0; // stop right away if the gyro breaks } // clamp the spin to 0.0:1.0 -- 2.39.5