From ba4cad888865cd19e14cde42c03cc50f2a0745ab Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 20 Apr 2020 13:37:13 +0200 Subject: Add fw simulator --- controller/fw/src/dsss_demod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'controller/fw/src') diff --git a/controller/fw/src/dsss_demod.c b/controller/fw/src/dsss_demod.c index 58dae9a..ad44b29 100644 --- a/controller/fw/src/dsss_demod.c +++ b/controller/fw/src/dsss_demod.c @@ -270,7 +270,8 @@ void group_received(struct dsss_demod_state *st) { /* Search for weakest entry */ /* TODO figure out this fitness function */ - float score = st->matcher_cache[i].last_score * (1.5f + 1.0f/st->matcher_cache[i].data_pos); + float score = st->matcher_cache[i].last_score * (1.5f + 0.1 * st->matcher_cache[i].data_pos); + if (debug) DEBUG_PRINTN(" score %zd %f %f %d", i, score, st->matcher_cache[i].last_score, st->matcher_cache[i].data_pos); if (score < min_score) { min_idx = i; min_score = score; -- cgit