Tobi's ubw test branch
Dependencies: mavlink_bridge mbed
Fork of AIT_UWB_Range by
Diff: MM2WayRanging/MM2WayRanging.cpp
- Revision:
- 58:b824bdac7cd8
- Parent:
- 53:79a72d752ec4
- Child:
- 67:bd0f0580af5a
diff -r b4e7324b0faf -r b824bdac7cd8 MM2WayRanging/MM2WayRanging.cpp --- a/MM2WayRanging/MM2WayRanging.cpp Mon Jan 04 20:06:38 2016 +0000 +++ b/MM2WayRanging/MM2WayRanging.cpp Mon Jan 04 20:55:33 2016 +0000 @@ -26,6 +26,9 @@ if (isAnchor) { dw.enable_irq(); dw.startRX(); + } else { + dw.disable_irq(); + dw.setInterrupt(false, false); } } @@ -146,6 +149,7 @@ return; } + dw.setInterrupt(true, true); // pc.printf("Request range %d\r\n", remote_address); dw.enable_irq(); @@ -170,6 +174,7 @@ } dw.stopTRX(); dw.disable_irq(); + dw.setInterrupt(false, false); } inline float MM2WayRanging::calibratedDistance(uint8_t remote_address) {