From c265553652444293f90189c7481fb7eb16f28115 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 19 Nov 2011 19:01:00 +0100 Subject: Separated AHRS and telemetry code. --- ahrs.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ahrs.h (limited to 'ahrs.h') diff --git a/ahrs.h b/ahrs.h new file mode 100644 index 0000000..e78ae8d --- /dev/null +++ b/ahrs.h @@ -0,0 +1,25 @@ +#ifndef AHRS_H +#define AHRS_H + +#include "itg3200.h" +#include "bma150.h" + +class AHRS { + public: + ITG3200 gyro; + BMA150 accel; + + AHRS(I2C& i2c) : gyro(i2c), accel(i2c) {} + + void init() { + gyro.init(); + accel.init(); + } + + void update() { + gyro.update(); + accel.update(); + } +}; + +#endif -- cgit v1.2.3