summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordufour2010-02-01 13:38:33 +0000
committerdufour2010-02-01 13:38:33 +0000
commitb4935c2d88932d7a04d2cfa22e7ea48605303e82 (patch)
treee531d5daa5b61b201dc4cb72c070a9ed51ae9603
parent94253fd3af13c6ad208e85e4e3a4bb383cbd594c (diff)
cesar/ce/rx/bl: set default NSR margin to 6dB
Also fix the comments to understand how to set this value correctly. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6684 017c9cb6-072f-447c-8318-d5b54f68fe89
-rw-r--r--cesar/ce/rx/bitloading/src/nsr.c8
-rw-r--r--cesar/ce/rx/bitloading/test/src/test_bl.c6
2 files changed, 8 insertions, 6 deletions
diff --git a/cesar/ce/rx/bitloading/src/nsr.c b/cesar/ce/rx/bitloading/src/nsr.c
index 0c457904ab..83a5eb72d2 100644
--- a/cesar/ce/rx/bitloading/src/nsr.c
+++ b/cesar/ce/rx/bitloading/src/nsr.c
@@ -17,11 +17,13 @@
#include "hal/phy/defs.h"
/**
- * Default value is 3db.
+ * Default value of margin to apply to NSR.
+ * To convert a dB value to this one, you need to apply the following formula:
* round (10^(default_value / 10) * CE_RX_BL_NSR_MARGIN_QUANT_FACTOR).
- * With 3db, this evaluate to 2.
+ *
+ * Set it to the maximum permitted value (~ 6dB).
*/
-u8 ce_rx_bl_nsr_margin_ = 128;
+u8 ce_rx_bl_nsr_margin_ = 255;
void
ce_rx_bl_nsr_sum_init (ce_rx_bitloading_t *bl, phy_chandata_t *chan_data,
diff --git a/cesar/ce/rx/bitloading/test/src/test_bl.c b/cesar/ce/rx/bitloading/test/src/test_bl.c
index 79f9c6f5e2..dd134f700e 100644
--- a/cesar/ce/rx/bitloading/test/src/test_bl.c
+++ b/cesar/ce/rx/bitloading/test/src/test_bl.c
@@ -576,9 +576,9 @@ test_suite_ce_rx_bl_nsr_margin (test_t t)
test_begin (t, "NSR margin initialisation")
{
- /* It should be set to 3 db, 2 * quantification. */
- test_fail_if (ce_rx_bl_nsr_margin_ != 2
- * CE_RX_BL_NSR_MARGIN_QUANT_FACTOR);
+ /* It should be set to the maximum value of supported margin (around
+ * 6db). */
+ test_fail_if (ce_rx_bl_nsr_margin_ != (u8) (-1));
} test_end;
test_begin (t, "NSR margin configuration")