Hi,
Please find attached a patch to add band plans. It replaces "Automatic Repeater Offsets".
When you have a band plan selected and you modify a frequency, the band plan code looks up the frequency and sets:
- The default mode.
- The default repeater offset.
- The default tune step.
There is also support in the band plan for tones, but it isn't plumbed through yet.
You can select multiple plans because, for example, you might want both an IARU plan and a country plan.
chirpui/bandplans.py is the API for accessing band plans. chirp/bandplan_*.py are the technical details of each band plan. bandplans.py is in the UI directory because it deals with config, which appears to be used exclusively from the chirpui directory.
The format in bandplan_au.py is the format I prefer. The format in bandplan_na.py is carried over from chirp_common.py and should be replaced by the new format once we agree on how it should look.
While testing this I noticed that there are multiple instances of the config class, with different and overlapping lifetimes. This means that sometimes configuration changes are applied and sometimes they are not. That is a separate issue.
--