Skip to content

Commit 28c72c7

Browse files
committed
fix(param editor): Do not skip optional steps in normal GUI complexity mode
1 parent 7d5e19f commit 28c72c7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

ardupilot_methodic_configurator/data_model_parameter_editor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,12 +1255,13 @@ def is_configuration_step_optional(self, file_name: Optional[str] = None, thresh
12551255

12561256
return percentage <= threshold_pct
12571257

1258-
def get_next_non_optional_file(self, current_file: Optional[str] = None) -> Optional[str]:
1258+
def get_next_non_optional_file(self, current_file: Optional[str] = None, gui_complexity: str = "simple") -> Optional[str]:
12591259
"""
12601260
Get the next non-optional configuration file in sequence.
12611261
12621262
Args:
12631263
current_file: The current parameter file being processed, defaults to self.current_file.
1264+
gui_complexity: The GUI complexity setting ("simple" or other).
12641265
12651266
Returns:
12661267
Optional[str]: Next non-optional file name, or None if at the end.
@@ -1276,10 +1277,9 @@ def get_next_non_optional_file(self, current_file: Optional[str] = None) -> Opti
12761277
try:
12771278
next_file_index = files.index(current_file) + 1
12781279

1279-
# Skip files with mandatory_level == 0 (completely optional)
12801280
while next_file_index < len(files):
12811281
next_file = files[next_file_index]
1282-
if not self.is_configuration_step_optional(next_file, threshold_pct=0):
1282+
if not self.is_configuration_step_optional(next_file, threshold_pct=20 if gui_complexity == "simple" else -1):
12831283
return next_file
12841284
next_file_index += 1
12851285

ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ def on_skip_click(self, _event: Union[None, tk.Event] = None) -> None: # noqa:
11591159
self.write_changes_to_intermediate_parameter_file()
11601160

11611161
# Use ParameterEditor to get the next non-optional file
1162-
next_file = self.parameter_editor.get_next_non_optional_file()
1162+
next_file = self.parameter_editor.get_next_non_optional_file(current_file=None, gui_complexity=self.gui_complexity)
11631163

11641164
if next_file is None:
11651165
# No more files to process, write summary and close

0 commit comments

Comments
 (0)