Function to return tide stations in the MPC

This commit is contained in:
April 2022-10-21 22:01:49 -07:00
parent 910d692f0d
commit 5b734f314c
No known key found for this signature in database
GPG Key ID: 17A9A017FAA4DE5E

View File

@ -29,6 +29,12 @@ def getPrimaryLocations():
return locationIds return locationIds
def getTideStations():
""" Returns all of the tide stations present in the MachineProductCfg """
stations = []
for i in data['Config']['ConfigDef']['ConfigItems']['ConfigItem']:
if "TideStation" in i['@key'] and i['@value'] != "":
stations.append(i['@value'].split("_")[2])
def getAirportCodes(): def getAirportCodes():
""" Returns all of the airport identifiers present in the MachineProductCfg """ """ Returns all of the airport identifiers present in the MachineProductCfg """