qmsk / e2

E2 Client, Tally output
Mozilla Public License 2.0
26 stars 7 forks source link

Issue with tally code. #49

Closed Hardakin closed 4 years ago

Hardakin commented 4 years ago

Running 0.6.1 Relatively new to the Raspberry Pi. Great work on the Tally software. After a couple of learning kicks to the head I was able to get it up and running. I do want to mention that the file for the designation of the Tally GPIO pins needs to be addressed. In the /etc/default qmsk-e2-tally file, not only do you have to remove the comments "#", but there is an extra blank line that needs to be removed as well.

On another note: Is there a way to get the software to ignore more than on destination? I can get it to ignore a single destination by placing it in the above file at the end. But if I try to add another destination to ignore, it will ignore the second destination and not the first. I'm sure it's just a configuration error on my part. Any help would be appreciated.

SpComb commented 4 years ago

I do want to mention that the file for the designation of the Tally GPIO pins needs to be addressed. In the /etc/default qmsk-e2-tally file, not only do you have to remove the comments "#", but there is an extra blank line that needs to be removed as well.

Agreed, the the EnvironmentFile=/etc/default/qmsk-e2-tally syntax with the \ line-continuations is not very user-friendly. Unfortunately, it's the file format defined by systemd, and there's not really any better way to define those TALLY_OPTIONS.

The go-flags package that we use supports setting option default values from environment variables, so the tally gpio options could be improved to support separate environment variables like TALLY_GPIO_PIN_GREEN=23, TALLY_GPIO_PIN_RED=24, TALLY_GPIO_PINS=... etc, which would make the /etc/default/qmsk-e2-tally much easier to use.

Alternatively some custom .toml configuation file.

Is there a way to get the software to ignore more than on destination? I can get it to ignore a single destination by placing it in the above file at the end. But if I try to add another destination to ignore, it will ignore the second destination and not the first. I'm sure it's just a configuration error on my part. Any help would be appreciated.

You can only pass --tally-ignore-dest=REGEXP once, but you can use a regexp that matches multiple different values: --tally-ignore-dest=Monitor|Test. Note that a regexp pattern like "Monitor" will also match destination names like "Monitor 1", unless use you ^...$ to anchor to regexp to the start/end of the name.

I edited https://github.com/qmsk/e2/wiki/Tally#configuration to add some better examples.

The quoting with the special characters may get a little tricky when passing regexps via the shell or the systemd EnvironmentFile, but they're powerful enough to express anything you need.

SpComb commented 4 years ago

Issue #50 for supporting separate environment variables to simplify the /etc/default/qmsk-e2-tally syntax, and --tally-ignore-dest needs better examples in the wiki docs.