Tobi's ubw test branch

Dependencies:   mavlink_bridge mbed

Fork of AIT_UWB_Range by Benjamin Hepp

MMRanging/MMRanging.h

Committer:
manumaet
Date:
2014-11-28
Revision:
30:4ecc69d3cf8d
Parent:
28:a830131560e8
Child:
31:6f76f3d518ac

File content as of revision 30:4ecc69d3cf8d:

// by Matthias Grob & Manuel Stalder - ETH Zürich - 2015

#ifndef MMRANGING_H
#define MMRANGING_H

#include "mbed.h"
#include "DW1000.h"

#define MMRANGING_TIMEUNIT      1/(128*499.2)               // conversion between LSB of TX and RX timestamps and microseconds

class MMRanging {
    public:
        MMRanging(DW1000& DW);
        void requestRanging();
    //private:
        DW1000& dw;
        
        void callbackRX();
        void callbackTX();
        
        // draft for first test
        bool receiver;
        char message[1021];
        char messageRX[1021];
        uint64_t TX_timestamp;
        uint64_t RX_timestamp;
        int event_i;
        char event[10][20];
        uint64_t eventtimes[10];
        uint8_t counter;
};

#endif