Tobi's ubw test branch
Dependencies: mavlink_bridge mbed
Fork of AIT_UWB_Range by
Diff: MMRanging/MMRanging.h
- Revision:
- 35:95d838d33bf5
- Parent:
- 34:f56962030c5c
- Child:
- 36:883de6f9a73b
--- a/MMRanging/MMRanging.h Sat Dec 27 14:37:12 2014 +0000 +++ b/MMRanging/MMRanging.h Tue Feb 17 10:58:58 2015 +0000 @@ -6,7 +6,8 @@ #include "mbed.h" #include "DW1000.h" -#define MMRANGING_TIMEUNIT 1/(128*499.2) // conversion between LSB of TX and RX timestamps and microseconds +#define MMRANGING_TIMEUNIT_US 1/(128*499.2) // conversion between LSB of TX and RX timestamps and microseconds +#define MMRANGING_TIMEUNIT_NS 1000/(128*499.2) // conversion between LSB of TX and RX timestamps and nanoseconds class MMRanging { public: @@ -18,7 +19,7 @@ void callbackRX(); void callbackTX(); - void sendRangingframe(uint8_t type, uint8_t sequence_number, uint64_t time_difference_receiver, uint16_t dummy); + void sendRangingframe(uint8_t type, uint8_t sequence_number, uint64_t time_difference_receiver); struct rangingframe { uint32_t type; @@ -27,15 +28,12 @@ } ; uint64_t rangingtimingsSender[10][2]; uint64_t rangingtimingsReceiver[10][2]; - uint8_t ranging_i; - uint64_t tofs[10]; + uint64_t tofs; rangingframe TX; // draft for first test bool receiver; - char message[1021]; - char messageRX[1021]; uint64_t TX_timestamp; uint64_t RX_timestamp; int event_i;