diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-11-19 19:01:00 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-11-19 19:50:47 +0100 |
commit | c265553652444293f90189c7481fb7eb16f28115 (patch) | |
tree | 5893b010198fc95fbe4c65c2591137a953d34189 /ahrs.h | |
parent | 501b5765964affe9b48c88a5b580bd321170cc38 (diff) |
Separated AHRS and telemetry code.
Diffstat (limited to 'ahrs.h')
-rw-r--r-- | ahrs.h | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -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 |