Matthias Grob & Manuel Stalder / Mbed 2 deprecated DecaWave

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
manumaet
Date:
Fri Nov 28 17:06:51 2014 +0000
Parent:
29:019ff388ed76
Child:
31:6f76f3d518ac
Commit message:
before starting with the real first ranging try

Changed in this revision

DW1000/DW1000.h Show annotated file Show diff for this revision Revisions of this file
MMRanging/MMRanging.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/DW1000/DW1000.h	Fri Nov 28 16:45:10 2014 +0000
+++ b/DW1000/DW1000.h	Fri Nov 28 17:06:51 2014 +0000
@@ -77,7 +77,7 @@
         void startRX();                                                                         // start listening for frames
         void stopTRX();                                                                         // disable tranceiver go back to idle mode
         
-    //private:
+    private:
         void loadLDE();                                                                         // load the leading edge detection algorithm to RAM, [IMPORTANT because receiving malfunction may occur] see User Manual LDELOAD on p22 & p158
         void resetRX();                                                                         // soft reset only the tranciever part of DW1000
         void resetAll();                                                                        // soft reset the entire DW1000 (some registers stay as they were see User Manual)
--- a/MMRanging/MMRanging.h	Fri Nov 28 16:45:10 2014 +0000
+++ b/MMRanging/MMRanging.h	Fri Nov 28 17:06:51 2014 +0000
@@ -11,12 +11,13 @@
 class MMRanging {
     public:
         MMRanging(DW1000& DW);
-        void callbackRX();
-        void callbackTX();
         void requestRanging();
     //private:
         DW1000& dw;
         
+        void callbackRX();
+        void callbackTX();
+        
         // draft for first test
         bool receiver;
         char message[1021];
--- a/main.cpp	Fri Nov 28 16:45:10 2014 +0000
+++ b/main.cpp	Fri Nov 28 17:06:51 2014 +0000
@@ -5,19 +5,19 @@
 #include "MMRanging.h"                              // our self developed raning application
 
 PC          pc(USBTX, USBRX, 921600);               // USB UART Terminal
-DW1000      dw(PA_7, PA_6, PA_5, PB_6, PB_9);       // SPI1 on Nucleo Board (MOSI, MISO, SCLK, CS, IRQ)
+DW1000      dw(PA_7, PA_6, PA_5, PB_6, PB_9);       // Device driver instanceSPI pins: (MOSI, MISO, SCLK, CS, IRQ)
 MMRanging   r(dw);                                  // Ranging class for getting distances and later positions
 
 char message[100] = "";
 
 int main() {
     pc.printf("DecaWave 0.2\r\nup and running!\r\n");  
-    dw.setEUI(0xFAEDCD01FAEDCD01);                  // basic methods called to check if we have a working SPI connection
+    dw.setEUI(0xFAEDCD01FAEDCD01);                                  // basic methods called to check if we have a working SPI connection
     pc.printf("DEVICE_ID register: 0x%X\r\n", dw.getDeviceID());
     pc.printf("EUI register: %016llX\r\n", dw.getEUI());
     pc.printf("Voltage: %f\r\n", dw.getVoltage());
 
-    r.receiver = true;
+    //r.receiver = true;
     
     while(1) {
         for(int j = 0; j < 10; j++)