summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 88de2d6)
raw | patch | inline | side by side (parent: 88de2d6)
author | Sebastien Tomas <a0918790@ti.com> | |
Wed, 14 Jan 2015 13:00:18 +0000 (14:00 +0100) | ||
committer | Sebastien Tomas <a0918790@ti.com> | |
Wed, 14 Jan 2015 13:00:18 +0000 (14:00 +0100) |
src/dfelld/DFE_bb.c | patch | blob | history |
diff --git a/src/dfelld/DFE_bb.c b/src/dfelld/DFE_bb.c
index 3bee58482f36947c9757f2fe191c098b52e7da9e..8409b39bc70c96dca55a407a01c7b2371d4f5b7e 100755 (executable)
--- a/src/dfelld/DFE_bb.c
+++ b/src/dfelld/DFE_bb.c
*peak = 10*log10(((float)integer+((float)fraction/65536.0))*pow(2,exponent));
// 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
- *peak -= 10*log10((float)(256));
+ *peak -= 10*log10((float)(256*256));
integer = CSL_FEXTR(bbpmRead.rmsPower, 15, 6);
exponent = CSL_FEXTR(bbpmRead.rmsPower, 5, 0);
// return the average from accumulated power
// 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
if (bbpmConfig.intgPd) {
- *rms -= 10*log10((float)(bbpmConfig.intgPd*256));
+ *rms -= 10*log10((float)(bbpmConfig.intgPd*256*256));
}
return DFE_ERR_NONE;