From 7ca08294e799c7e41508f4bd994304fef581981a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Apr 2014 15:22:42 +1000 Subject: [PATCH] Replay: added floating point exception checking allows NaN errors to be caught in gdb --- Tools/Replay/Replay.pde | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tools/Replay/Replay.pde b/Tools/Replay/Replay.pde index dbe26fdd77..7f21a8c8c3 100644 --- a/Tools/Replay/Replay.pde +++ b/Tools/Replay/Replay.pde @@ -47,6 +47,7 @@ #include #include #include +#include #include "LogReader.h" @@ -84,7 +85,7 @@ static FILE *ekf4f; static bool done_parameters; static bool done_baro_init; static bool done_home_init; -static uint16_t update_rate; +static uint16_t update_rate = 50; static uint32_t arm_time_ms; static uint8_t num_user_parameters; @@ -179,6 +180,8 @@ void setup() LogReader.wait_type(LOG_GPS_MSG); LogReader.wait_type(LOG_IMU_MSG); + feenableexcept(FE_INVALID | FE_OVERFLOW); + ahrs.set_compass(&compass); ahrs.set_fly_forward(true); ahrs.set_wind_estimation(true);