Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for regex in unitTagsFile #764

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

EricTendian
Copy link
Contributor

For large radio systems, it can be impractical to list out every possible permutation of a radio ID in the unitTagsFile. Often radio systems have IDs that follow particular patterns which can be modeled in a regular expression.

This PR adds support to the unitTagsFile for regular expressions, such that all units matching the same regex can be tagged with the corresponding name. Capture groups are supported in the name as well, so a name of "Engine $1" in the file can get translated to "Engine 225".

I've updated the configuration docs with more information on how to use this.

@@ -26,31 +26,31 @@ The amount of tuning error is -14500Hz, so that would go under **error:** for th

**NOTE:** In some instances, an alternative is to use `ppm` correction rather than the `error` configuration option.

Alternatively, you can use this tool here: http://garvas.org/trunk-recorder/ to obtain RTL-SDR dongle/array configurations.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore most of these changes, my IDE is just getting rid of trailing whitespace.

@@ -401,3 +401,18 @@ The **Enable** Column is optional and defaults to *True*. It only needs to be ad
| --------- | --------- | -------- | ------------- | ---------------------- | ------ | ------ | ------------------- |
| 300 | 462275000 | 94.8 PL | Town A Police | Town A Police Dispatch | Police | Town A | |
| 325 | 462275000 | 151.4 PL | Town B DPW | Town B Trash Dispatch | DPW | Town B | False |


## unitTagsFile
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the actual doc update.

@taclane
Copy link
Contributor

taclane commented Jan 21, 2023

Very nice! I tried something like this a while back with just a simple wildcard character like: 1427???, State Police and it was really cool to start seeing meaningful unit IDs come across in Rdio-Scanner. This is a way better solution.

@robotastic
Copy link
Owner

This is really slick!! Nice work @EricTendian

@robotastic robotastic merged commit ee002ac into robotastic:master Jan 31, 2023
@EricTendian EricTendian deleted the unit-id-regex branch January 31, 2023 03:39
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.

None yet

3 participants