From fdc94ec28ac198726cd8178ddfc716e23214b1a9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 26 Nov 2016 18:36:36 +1100 Subject: [PATCH] AP_HAL: fixed frequency init for register checking --- libraries/AP_HAL/Device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL/Device.cpp b/libraries/AP_HAL/Device.cpp index 8e456f0b85..75cc6413eb 100644 --- a/libraries/AP_HAL/Device.cpp +++ b/libraries/AP_HAL/Device.cpp @@ -42,14 +42,14 @@ bool AP_HAL::Device::setup_checked_registers(uint8_t nregs, uint8_t frequency) _checked.n_allocated = 0; _checked.n_set = 0; _checked.next = 0; - _checked.frequency = frequency; - _checked.counter = 0; } _checked.regs = new struct checkreg[nregs]; if (_checked.regs == nullptr) { return false; } _checked.n_allocated = nregs; + _checked.frequency = frequency; + _checked.counter = 0; return true; }