Fixed CTCSS tone detection (#1226)

* Fixed erroneous rounding code

* Fixed CTCSS tone detection

* Correct tone index for XZ/WZ and sort table by tone freq
This commit is contained in:
Mark Thompson 2023-07-01 08:36:07 -05:00 committed by GitHub
parent c2279e297c
commit 4e128e8930
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -72,7 +72,7 @@ void NarrowbandFMAudio::execute(const buffer_c8_t& buffer) {
cur_sample = audio_f[c];
if (cur_sample * prev_sample < 0.0) {
z_acc += z_timer;
z_timer = 0;
z_timer = 1;
z_count++;
} else
z_timer++;