Skip to content

Commit 14c32b0

Browse files
committed
build_parameters.py: filters out old parameters
1 parent fe92fd7 commit 14c32b0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

build_parameters.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ def format(self, record):
8989
ALLVEHICLES = ["AntennaTracker", "Copter", "Plane", "Rover", "Sub", "Blimp"]
9090
VEHICLES = ALLVEHICLES
9191

92+
# Filter out versions below this semantic version threshold.
93+
PARAM_PARSE_MINIMUM_VERSION = (3, 9, 0)
94+
9295
BASEPATH = ""
9396

9497

@@ -551,6 +554,7 @@ def replace_anchors(source_file, dest_file, version_tag):
551554
# Not elegant workaround:
552555
# These versions present errors when parsing using param_parser.py. Needs more investigation?
553556
if (
557+
"beta-V4.3.8" in version or # leftover beta files
554558
"3.2.1" in version or # last stable APM Copte
555559
"3.4.0" in version or # last stable APM Plane
556560
"3.4.6" in version or # Copter
@@ -561,6 +565,11 @@ def replace_anchors(source_file, dest_file, version_tag):
561565
debug(f"Ignoring APM version:\t{vehicle}\t{version}")
562566
continue
563567

568+
# Need to keep v1.X.0 AntennaTracker versions
569+
if "antenna" not in vehicle.lower() and version_is_below_version(version, PARAM_PARSE_MINIMUM_VERSION):
570+
debug(f"Ignoring APM version:\t{vehicle}\t{version} (below {'.'.join(map(str, PARAM_PARSE_MINIMUM_VERSION))})")
571+
continue
572+
564573
# Checkout an Commit ID in order to get its parameters
565574
try:
566575
debug(f"Git checkout on {vehicle} version {version} id {commit_id}")

0 commit comments

Comments
 (0)