DW1000 UWB driver based on work of Matthias Grob & Manuel Stalder - ETH Zürich - 2015
Revision 13:8718966cd81e, committed 2017-03-28
- Comitter:
- AndyA
- Date:
- Tue Mar 28 15:49:42 2017 +0000
- Parent:
- 12:da4b09aff6af
- Child:
- 14:02f0912e4ce4
- Commit message:
- Added full LED output function
Changed in this revision
DW1000.cpp | Show annotated file Show diff for this revision Revisions of this file |
DW1000.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/DW1000.cpp Tue Mar 28 15:18:36 2017 +0000 +++ b/DW1000.cpp Tue Mar 28 15:49:42 2017 +0000 @@ -600,6 +600,13 @@ *preAmbleAcc_NoSat = readRegister16(DW1000_DRX_CONF,DWDRX_RXPAC_NOSAT); } +void getFullLEDMetrics(uint16_t *led_thresh, uint16_t *led_ppindx, uint16_t *led_ppampl) { + *led_thresh = readRegister16(DW1000_LDE_CTRL,DWLDE_LDE_THRESH); + *led_ppindx = readRegister16(DW1000_LDE_CTRL,DWLDE_LDE_PPINDX); + *led_ppampl = readRegister16(DW1000_LDE_CTRL,DWLDE_LDE_PPAMPL); + } + + #define SQR(x) ((float)(x) * (float)(x)) void DW1000::getRxSignalPower(float *direct, float *total)
--- a/DW1000.h Tue Mar 28 15:18:36 2017 +0000 +++ b/DW1000.h Tue Mar 28 15:49:42 2017 +0000 @@ -170,6 +170,7 @@ void getFullQualityMetrics(uint16_t *std_noise, uint16_t *fp_amp1, uint16_t *fp_amp2, uint16_t *fp_amp3, uint16_t *cir_pwr, uint16_t *preAmbleAcc, uint16_t *preAmbleAcc_NoSat); + void getFullLEDMetrics(uint16_t *led_thresh, uint16_t *led_ppindx, uint16_t *led_ppampl); protected: @@ -326,7 +327,6 @@ return readRegister16(DW1000_LDE_CTRL,DWLDE_LDE_THRESH); } - /** Get the LDE Peak path amplitude * @return the Leading edge detection peak path amplitude value */