QC Control software

Dependencies:   mbed

Fork of dgps by Colin Stearns

handle/handleCompass.cpp

Committer:
krobertson
Date:
2014-04-03
Revision:
17:323fc40376d5

File content as of revision 17:323fc40376d5:

#include "handleCompass.h"

compassHandle::compassHandle(){
    heading = 0;
    setup();
}

compassHandle::setup(){
    compass.init();
    compass.enableDefault();
}

compassHandle::run(){
    compass.read();
    heading = compass.get_heading();
}