summaryrefslogtreecommitdiff
path: root/cesar/ce/rx/bitloading/test/intervals
diff options
context:
space:
mode:
authorCyril Jourdan2013-04-18 16:09:35 +0200
committerCyril Jourdan2013-04-18 16:42:08 +0200
commit7c20f872a76ae8d6fe10223528287d427cf87076 (patch)
treee07671a1e7f332fdbb27a9fad1e6fbadda242302 /cesar/ce/rx/bitloading/test/intervals
parent13e0d70d0f2870c395f845ebdfadb0452c860bf9 (diff)
cesar/ce/rx/bl: update default tonemap when restarting an interval, refs #2588
The idea is to keep the default tonemap when we have only one interval active that is restarting, if it is doing so to make it better. If the update function seems a bit complex, it is because it is ready to be modified to handle the case where there is more than one interval (see #3880).
Diffstat (limited to 'cesar/ce/rx/bitloading/test/intervals')
-rw-r--r--cesar/ce/rx/bitloading/test/intervals/src/test_intervals_fsm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cesar/ce/rx/bitloading/test/intervals/src/test_intervals_fsm.c b/cesar/ce/rx/bitloading/test/intervals/src/test_intervals_fsm.c
index 2592f83200..dd40bba3ae 100644
--- a/cesar/ce/rx/bitloading/test/intervals/src/test_intervals_fsm.c
+++ b/cesar/ce/rx/bitloading/test/intervals/src/test_intervals_fsm.c
@@ -71,14 +71,15 @@ test_ce_rx_bl_fsm_INTERVAL_TRACKING (test_t t)
measure.rx_params.sound_complete = false;
sta_t sta;
- sta.intervals = ce_rx_bl_intervals_alloc (tested_tmi);
+ sta.intervals = ce_rx_bl_intervals_alloc (tested_tmi + 1);
tonemaps_t rx_tms, tx_tms;
sta.rx_tonemaps = &rx_tms;
+ sta.rx_tonemaps->default_tmi = tested_tmi + 1;
sta.tx_tonemaps = &tx_tms;
/* The tmi of the intervals is different from the default tmi. */
- sta.rx_tonemaps->default_tmi = tested_tmi + 1;
+ sta.intervals->tmi[tested_fsm_id] = tested_tmi;
test_case_begin (t, "INTERVAL_TRACKING, interval_sound appears");
@@ -109,7 +110,7 @@ test_ce_rx_bl_fsm_INTERVAL_TRACKING (test_t t)
.tmi = TONEMAP_INDEX_INTERVAL_UNAVAILABLE);
else
fsm_base[pos++] = (scenario_entry_t) SCENARIO_EVENT (
- mac_interval_append, .tms = &rx_tms, .tmi = tested_tmi);
+ mac_interval_append, .tms = &rx_tms, .tmi = tested_tmi + 1);
}
fsm_base[pos++] = (scenario_entry_t) SCENARIO_EVENT (
mac_interval_commit_changes, .tms = &rx_tms);