do som other code quallity changes

This commit is contained in:
Bastian Schroll 2017-02-12 10:32:17 +01:00
parent 3c00628b2d
commit 566585d6d0
2 changed files with 5 additions and 8 deletions

View file

@ -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

View file

@ -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"))