From 88b2139d91af1c1ea30c32f1c835b6a9b66f97a5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 30 Apr 2012 16:11:55 +1000 Subject: [PATCH] Baro: added suspend/resume on init --- libraries/AP_Baro/AP_Baro_MS5611.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_Baro/AP_Baro_MS5611.cpp b/libraries/AP_Baro/AP_Baro_MS5611.cpp index 6e1780b0a4..49b8f5da40 100644 --- a/libraries/AP_Baro/AP_Baro_MS5611.cpp +++ b/libraries/AP_Baro/AP_Baro_MS5611.cpp @@ -113,6 +113,8 @@ void AP_Baro_MS5611::_spi_write(uint8_t reg) // SPI should be initialized externally bool AP_Baro_MS5611::init( AP_PeriodicProcess *scheduler ) { + scheduler->suspend_timer(); + pinMode(MS5611_CS, OUTPUT); // Chip select Pin digitalWrite(MS5611_CS, HIGH); delay(1); @@ -137,6 +139,7 @@ bool AP_Baro_MS5611::init( AP_PeriodicProcess *scheduler ) Temp=0; Press=0; + scheduler->resume_timer(); scheduler->register_process( AP_Baro_MS5611::_update ); healthy = true;