Limit bandmap_lookup to the list of displayed spots#507
Conversation
|
A quick hack to limit the search in 'bandmap_lookup()' to the displayed list of spots. May need some more love. |
|
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. |
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. |
|
Besides some refactoring of the range calculation and the final spot display it should be correct now. |
Yes, thanks - easy guess :-) .
Here is the situation:
The following drawing shows the situation .......|--------X--------|..... X - displayed frequency of rig, |----X----| range the 'real' trx frequency may be in So depending on trx frequency rounded up or down a displayed difference from .1 kHz between TRX: and spot frequency may lead to a display 'beside spot' or 'on spot'. The situation is more complicated for the self spotted entries. We should harmonize the situation by using also 100 Hz granularity here. |
|
I see the logic, thanks. Nevertheless there is still an issue here. The internal freq values are stored in Hz precision, so normally no rounding is involved when evaluating the bandmap. I think here is my point: Condition A says that spots below or at QRG-100 Hz are the ones "below". Now, if out spot is on 7042000 Hz, then for various QRGs So it seems in Condition A the less-than-equal should be simply less. |
|
The tolerance/rounding story looks more complicated than I thought, will open a separate issue to review it. |
|
Ok, lets delay the the rounding problem for now and merge the actual version in. |
No description provided.