Merge pull request #449 from lgremme/subrics

Namensvergabe POC nur für einzelne Sub-RICs
This commit is contained in:
Bastian Schroll 2020-04-27 20:17:23 +02:00 committed by GitHub
commit e14fbb1b2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 2 deletions

View file

@ -3,6 +3,7 @@
### __[v2.5.1]__ - unreleased
##### Added
- Plugin requirements: Added requirements.txt for all plugins requiring extra python packages so the install will be easier
- DescriptionList POC: add new description parameter for Sub-RICs without a main RIC definition. parameter 'onlysubric'. [#449](https://github.com/Schrolli91/BOSWatch/pull/449)
##### Changed
##### Deprecated
##### Removed

View file

@ -103,6 +103,11 @@ filter_range_end = 9999999
# descriptions are loaded from csv/poc.csv
idDescribed = 0
# change between Main-RIC with Sub-RIC (0 - off)
# or only the Sub-RIC (1 - on)
# descriptions are loaded from csv/poc.csv
onlysubric = 0
# Static Massages for Subrics.
rica = Feuer
ricb = TH

View file

@ -5,12 +5,18 @@ ric,description
# For each RIC-Address you could set a description-text
# Use the structure: ric,"Description-Text"
#
# main RIC with subric:
# You can even define specific subrics, therefore you
# 1. need to specify a main RIC: 1234567, "Unit One"
# 2. specify a certain subric: 1234567B, "Subunit Bravo"
# The result for 1234567B will be "Unit One Subunit Bravo"
# - Be sure having defined the main RIC (step one)! -
#
# Only subric:
# Specify only the subric: 123457B, "Subunit Bravo"
# The result for 1234567B will be "Subunit Bravo"
# - main RIC is not required -
#
# !!! DO NOT delete the first line !!!
#
1234567,"POCSAG testdata äöüß"

Can't render this file because it has a wrong number of fields in line 2.

View file

@ -110,8 +110,11 @@ def getDescription(typ, data):
elif typ == "ZVEI":
resultStr = zveiDescribtionList[data]
elif typ == "POC":
resultStr = ricDescribtionList[data[:-1]] # MainRIC
resultStr += " " + ricDescribtionList[data] # SubRIC
if globalVars.config.getint("POC", "onlysubric"):
resultStr = ricDescribtionList[data] # only SubRIC
else:
resultStr = ricDescribtionList[data[:-1]] # MainRIC
resultStr += " " + ricDescribtionList[data] # SubRIC
else:
logging.warning("Invalid Typ: %s", typ)