summaryrefslogtreecommitdiff
path: root/cesar/mac/common
diff options
context:
space:
mode:
authorNicolas Schodet2013-04-09 17:10:26 +0200
committerNicolas Schodet2013-04-25 10:31:00 +0200
commit5cb308b1559050c6b5c025a20fef83b9b8e4e32c (patch)
treee0106f489bbca523f3fea241c0c9e4494cca7e41 /cesar/mac/common
parentc279d1cd1a75d117bd9f4a10c4b2014d4e276f10 (diff)
cesar/ce/rx: reset sound frame counter after a delay, closes #3909
Diffstat (limited to 'cesar/mac/common')
-rw-r--r--cesar/mac/common/src/tonemap.c1
-rw-r--r--cesar/mac/common/tonemap.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/cesar/mac/common/src/tonemap.c b/cesar/mac/common/src/tonemap.c
index 6ce325fab4..15a6cb9cfc 100644
--- a/cesar/mac/common/src/tonemap.c
+++ b/cesar/mac/common/src/tonemap.c
@@ -79,6 +79,7 @@ tonemaps_init (tonemaps_t *tms)
tms->intervals->version = 0;
tms->refresh_counter_s = 0;
tms->sound_frame_counter = TONEMAP_SOUND_FRAME_COUNTER;
+ tms->reset_sound_frame_counter = false;
for (i = 0; i < COUNT (tms->group_interval_sound_frame_counter); i++)
tms->group_interval_sound_frame_counter[i] =
TONEMAP_SOUND_FRAME_COUNTER;
diff --git a/cesar/mac/common/tonemap.h b/cesar/mac/common/tonemap.h
index 9011831f86..c459b569b5 100644
--- a/cesar/mac/common/tonemap.h
+++ b/cesar/mac/common/tonemap.h
@@ -282,9 +282,15 @@ struct tonemaps_t
* complete flag to stop receiving sound frames.
* In iterative mode, it should be reseted to the predefined value when we
* want to receive some sounds frame.
+ * It is also reset after a small delay after sound complete flag is
+ * transmitted.
*/
u8 sound_frame_counter;
/**
+ * Reset sound frame counter at next CE timer execution.
+ */
+ bool reset_sound_frame_counter;
+ /**
* Interval sound frame counter.
* This is similar to the sound frame counter, but for a given interval
* in group. It is reset when we want to receive sound frames.