Feature request: make rlist result count (hardcoded to top 4) configurable #142

Closed
opened 2026-10-05 01:25:39 +02:00 by adam · 2 comments
Owner

Is your feature request related to a problem? Please describe.

getRepeaterBook() in modules/locationdata.py hardcodes the output to the top 4 closest repeaters (for repeater in data[:4]:). In repeater-dense areas, this can cut off relevant nearby repeaters simply because 4+ others happen to rank slightly closer - not because they're actually far away or irrelevant.

Concretely: after the recent column-alignment fix (#332), I locally bumped this to data[:6] to test, and a repeater I know is genuinely useful and nearby (VE3GBT, Paisley, ~22.7mi) started showing up correctly - it had simply been the 5th-closest result, just outside the old hardcoded top-4 cutoff.

Describe the solution you would like

Make the result count a config.ini setting instead of a hardcoded constant, e.g. under [location]:

# Number of repeaters to include in rlist output (default 4)
repeaterListMax = 4

Then in getRepeaterBook():

for repeater in data[:my_settings.repeater_list_max]:

Leaving the default at 4 preserves current behavior for everyone who doesn't change it, so this is fully backward-compatible. Users in repeater-dense areas (or who just want a more complete local picture) could opt into a higher number, understanding it means a longer/more-chunked message in exchange.

Describe alternatives you have considered

Editing modules/locationdata.py directly to change the hardcoded 4, which is what I tested locally and confirmed works - but that gets overwritten/needs to be redone on every git pull, so a proper config option would help anyone else who wants this without needing to patch the file themselves.

Additional context

This pairs naturally with the #332 fix - now that the field alignment is correct, showing a couple more results is much more useful/trustworthy than before.

**Is your feature request related to a problem? Please describe.** `getRepeaterBook()` in `modules/locationdata.py` hardcodes the output to the top 4 closest repeaters (`for repeater in data[:4]:`). In repeater-dense areas, this can cut off relevant nearby repeaters simply because 4+ others happen to rank slightly closer - not because they're actually far away or irrelevant. Concretely: after the recent column-alignment fix (#332), I locally bumped this to `data[:6]` to test, and a repeater I know is genuinely useful and nearby (VE3GBT, Paisley, ~22.7mi) started showing up correctly - it had simply been the 5th-closest result, just outside the old hardcoded top-4 cutoff. **Describe the solution you would like** Make the result count a config.ini setting instead of a hardcoded constant, e.g. under `[location]`: ``` # Number of repeaters to include in rlist output (default 4) repeaterListMax = 4 ``` Then in `getRepeaterBook()`: ```python for repeater in data[:my_settings.repeater_list_max]: ``` Leaving the default at 4 preserves current behavior for everyone who doesn't change it, so this is fully backward-compatible. Users in repeater-dense areas (or who just want a more complete local picture) could opt into a higher number, understanding it means a longer/more-chunked message in exchange. **Describe alternatives you have considered** Editing `modules/locationdata.py` directly to change the hardcoded 4, which is what I tested locally and confirmed works - but that gets overwritten/needs to be redone on every `git pull`, so a proper config option would help anyone else who wants this without needing to patch the file themselves. **Additional context** This pairs naturally with the #332 fix - now that the field alignment is correct, showing a couple more results is much more useful/trustworthy than before. <!-- github-sync-id:5185894618 -->
adam closed this issue 2026-10-05 01:25:39 +02:00
Author
Owner

should be there now :)

should be there now :) <!-- github-comment-id:5334558966 -->
Author
Owner

Thanks! I'll test it out!

Thanks! I'll test it out! <!-- github-comment-id:5334617896 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/meshing-around#142