Alex Millane / Mbed 2 deprecated IFARanging

Dependencies:   mbed

Node/Beacon/Beacon.cpp

Committer:
millanea
Date:
2015-07-07
Revision:
0:99928431bb44

File content as of revision 0:99928431bb44:

#include "Beacon.h"

Beacon::Beacon( MM2WayRanging& newRanging, DW1000& newDw ) : Node( newRanging, newDw )
{
    debugprintf("Beacon Initialized\r\n") ;
}

void Beacon::execute()
{
    // Requesting ranging from node at address #1 TODO: 1 is hardcoded.
    ranging.requestRanging(1) ;
    // Printing received distance to serial
    debugprintf("%f\r\n", ranging.distances[1]) ;
}