summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7d990f1)
raw | patch | inline | side by side (parent: 7d990f1)
author | Laurent Gauthier <l-gauthier@ti.com> | |
Tue, 10 Feb 2015 13:33:14 +0000 (14:33 +0100) | ||
committer | Laurent Gauthier <l-gauthier@ti.com> | |
Tue, 10 Feb 2015 13:33:14 +0000 (14:33 +0100) |
src/dfelld/DFE_bb.c | patch | blob | history |
diff --git a/src/dfelld/DFE_bb.c b/src/dfelld/DFE_bb.c
index 713d98d36cd6ed26e80940ace5488e1a440973c4..264812c8f85d9109e5ff0b9bbec2e2d95fb0c128 100755 (executable)
--- a/src/dfelld/DFE_bb.c
+++ b/src/dfelld/DFE_bb.c
*peak = ((float)bbpmRead.peakPower/10.0);
*average = ((float)bbpmRead.rmsPower/10.0);
+ /* Rx samples are on 24 bits and scaled down to 16 bits after the power meter/beAGC block,
+ so shifting the measurement result by 8 bits (explains the 256*256 below) */
+ *peak -= 10.0*log10((float)(256*256));
+
/* Return the average from accumulated power, so divide by the number of samples
in the integration period. */
if (bbpmConfig.intgPd) {