Skip to content

Limit bandmap_lookup to the list of displayed spots#507

Open
dl1jbe wants to merge 6 commits intoTlf:masterfrom
dl1jbe:search_only_displayed_spots
Open

Limit bandmap_lookup to the list of displayed spots#507
dl1jbe wants to merge 6 commits intoTlf:masterfrom
dl1jbe:search_only_displayed_spots

Conversation

@dl1jbe
Copy link
Member

@dl1jbe dl1jbe commented Mar 18, 2026

No description provided.

@dl1jbe
Copy link
Member Author

dl1jbe commented Mar 18, 2026

A quick hack to limit the search in 'bandmap_lookup()' to the displayed list of spots. May need some more love.

@zcsahok
Copy link
Member

zcsahok commented Mar 19, 2026

Looks good, thanks. Not sure whether the start/stop variables need to be protected by the mutex as grabbing happens in the main thread. Also keeping 'i < spots->len' would not hurt.

@dl1jbe
Copy link
Member Author

dl1jbe commented Mar 20, 2026

Not sure whether the start/stop variables need to be protected by the mutex as grabbing happens in the main thread.

Yes, 'spots' array and the variables needs to stay in sync. But we can not just wrap the whole bandmap_show() by the mutex as it is already used in filter_spots() and the mutex can not be used recursive.

I will look into the problem - just give me time till Sunday. There are some more minor changes needed in bandmap.c anyway.

@dl1jbe
Copy link
Member Author

dl1jbe commented Mar 22, 2026

Besides some refactoring of the range calculation and the final spot display it should be correct now.
The mutex covers now the built of the spots array AND the calculation of the display range.

@dl1jbe dl1jbe requested a review from zcsahok March 22, 2026 19:01
@zcsahok
Copy link
Member

zcsahok commented Mar 23, 2026

Looks good. There are just 2 typos (frequencyi, capsi; using vi?).

When we at it, could we maybe have a look at the selection of bandmap's current frequency? Not sure how it shall work, but it's asymmetric now.

Example:

freq=3543.5, it is marked as different from the spot's frequency (3543.7), fine:
image

freq=3543.6, we are 100 Hz off and it is "rounded up" to the spot:
image

freq=3543.7, we are spot on:
image

freq=3543.8, we are again 100 Hz off, but no rounding takes place:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants