Benjamin Hepp / Mbed 2 deprecated AIT_UWB_Tracker

Dependencies:   DW1000 ait_link BufferedSerial mbed

Files at this revision

API Documentation at this revision

Comitter:
bhepp
Date:
Wed Apr 13 12:23:53 2016 +0000
Parent:
11:f8b58aca0332
Commit message:
Removed test-code for UWBLink

Changed in this revision

main_multi_range.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main_multi_range.cpp	Wed Apr 06 08:27:45 2016 +0000
+++ b/main_multi_range.cpp	Wed Apr 13 12:23:53 2016 +0000
@@ -166,22 +166,14 @@
 int main()
 {
     while (true) {
-
-        const PinName CS_PINS[5] = {D8, D9, D10, D14, D15};
-        for (int i = 0; i < sizeof(CS_PINS) / sizeof(PinName); ++i) {
-            DigitalOut out(CS_PINS[i]);
+        // Ensure that all DW units are deactiviated at the beginning
+        for (int i = 0; i < NUM_OF_DW_UNITS; ++i) {
+            DigitalOut out(DW_CS_PINS[i]);
             out = 1;
         }
     
         UWBLinkMbed ul(&pc, MAX_UWB_LINK_FRAME_LENGTH);
  
-//        while (true) {
-//        UWBMessage msg(UWBMessage::UWB_MESSAGE_TYPE_NOP);
-//        if (!ul.sendMessage(msg)) {
-//            ERROR_PRINTF("\r\nSending UWBLink message failed\r\n");
-//        }
-//        }
-   
         SPI spi(DW_MOSI_PIN, DW_MISO_PIN, DW_SCLK_PIN);
         spi.format(8, 0);                    // Setup the spi for standard 8 bit data and SPI-Mode 0 (GPIO5, GPIO6 open circuit or ground on DW1000)
         // NOTE: Minimum Frequency 1MHz. Below it is now working. Could be something with the activation and deactivation of interrupts.