Skip to content

Commit

Permalink
BUGFIX: Fix a regression, overwritting the ArduCopter_configuration_s…
Browse files Browse the repository at this point in the history
…teps.json in the vehicle directory got broken in a refractoring
  • Loading branch information
amilcarlucas committed May 20, 2024
1 parent b106f97 commit 2d0597f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions MethodicConfigurator/backend_filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def __init__(self, vehicle_dir: str, vehicle_type: str):
self.re_init(vehicle_dir, vehicle_type)

def re_init(self, vehicle_dir: str, vehicle_type: str):
ConfigurationSteps.re_init(self, vehicle_dir, vehicle_type)
self.vehicle_dir = vehicle_dir
self.vehicle_type = vehicle_type
self.param_default_dict = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ class ConfigurationSteps:
configuration_steps_filename (str): The name of the file containing documentation for the configuration files.
configuration_steps (dict): A dictionary containing the configuration steps.
"""
def __init__(self, vehicle_dir: str, vehicle_type: str):
def __init__(self, _vehicle_dir: str, vehicle_type: str):
self.configuration_steps_filename = vehicle_type + "_configuration_steps.json"
self.configuration_steps = {}
self.forced_parameters = {}
self.derived_parameters = {}

def re_init(self, vehicle_dir: str, vehicle_type: str):
self.configuration_steps_filename = vehicle_type + "_configuration_steps.json"
# Define a list of directories to search for the configuration_steps_filename file
search_directories = [vehicle_dir, os_path.dirname(os_path.abspath(__file__))]
file_found = False
Expand Down

0 comments on commit 2d0597f

Please sign in to comment.