mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-18 22:30:23 +01:00
do som other code quallity changes
This commit is contained in:
parent
3c00628b2d
commit
566585d6d0
|
|
@ -44,16 +44,13 @@ def decode(freq, decoded):
|
|||
fms_directionText = decoded[103:110] # Richtung (Text)
|
||||
fms_tsi = decoded[114:117] # Taktische Kruzinformation
|
||||
|
||||
proceec = True # no CRC-check required - proceed
|
||||
|
||||
# shall we use the CRC-check?
|
||||
if (globalVars.config.getboolean("FMS", "CheckCRC")):
|
||||
if "CRC correct" in decoded:
|
||||
# if CRC is to be checked, do so and save result
|
||||
proceed = True
|
||||
else:
|
||||
if "CRC correct" not in decoded:
|
||||
# if CRC must be checked and is not correct - dont proceed
|
||||
proceed = False
|
||||
else:
|
||||
# no CRC-check required - proceed
|
||||
proceed = True
|
||||
|
||||
if (proceed == True):
|
||||
fms_id = fms_service+fms_country+fms_location+fms_vehicle+fms_status+fms_direction # build FMS id
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ def replaceWildcards(text, data, lineBrakeAllowed=False):
|
|||
|
||||
# replace POC data
|
||||
if "ric" in data: text = text.replace("%RIC%", data["ric"])
|
||||
if "function" in data:
|
||||
if "function" in data:
|
||||
text = text.replace("%FUNC%", data["function"])
|
||||
if data["function"] == "1": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","rica"))
|
||||
if data["function"] == "2": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricb"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue