From fabee4458358a448bf752c3cbf029c07c23599cd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 7 May 2015 12:11:43 +1000 Subject: [PATCH] Rover: support raw IMU logging --- APMrover2/APMrover2.pde | 2 ++ APMrover2/defines.h | 1 + APMrover2/system.pde | 3 +++ 3 files changed, 6 insertions(+) diff --git a/APMrover2/APMrover2.pde b/APMrover2/APMrover2.pde index 955802dd37..0a90985c6e 100644 --- a/APMrover2/APMrover2.pde +++ b/APMrover2/APMrover2.pde @@ -737,6 +737,8 @@ static void one_second_loop(void) } counter = 0; } + + ins.set_raw_logging(should_log(MASK_LOG_IMU_RAW)); } static void update_GPS_50Hz(void) diff --git a/APMrover2/defines.h b/APMrover2/defines.h index 82111f5ac0..ad7c79b1a2 100644 --- a/APMrover2/defines.h +++ b/APMrover2/defines.h @@ -89,6 +89,7 @@ enum mode { #define MASK_LOG_STEERING (1<<13) #define MASK_LOG_RC (1<<14) #define MASK_LOG_WHEN_DISARMED (1UL<<16) +#define MASK_LOG_IMU_RAW (1UL<<19) // Waypoint Modes // ---------------- diff --git a/APMrover2/system.pde b/APMrover2/system.pde index 31d2e7228e..dcd8c800ba 100644 --- a/APMrover2/system.pde +++ b/APMrover2/system.pde @@ -248,6 +248,9 @@ static void startup_ground(void) // so set serial ports non-blocking once we are ready to drive serial_manager.set_blocking_writes_all(false); + ins.set_raw_logging(should_log(MASK_LOG_IMU_RAW)); + ins.set_dataflash(&DataFlash); + gcs_send_text_P(SEVERITY_LOW,PSTR("\n\n Ready to drive.")); }