From 266c0caace32fe127035a92623802884aba2f827 Mon Sep 17 00:00:00 2001 From: Joao Mario Lago Date: Mon, 16 Dec 2024 10:18:29 -0300 Subject: [PATCH] WIP --- core/services/ardupilot_manager/config.py | 18 +++++++++++++++++- core/services/ardupilot_manager/settings.py | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/core/services/ardupilot_manager/config.py b/core/services/ardupilot_manager/config.py index d1852bb57..46d570cd4 100644 --- a/core/services/ardupilot_manager/config.py +++ b/core/services/ardupilot_manager/config.py @@ -1,5 +1,21 @@ +import appdirs +from pathlib import Path + # This file is used to define general configurations for the app -SERVICE_NAME = "autopilot-manager" +SERVICE_NAME = "ardupilot-manager" + +# Paths + +SETTINGS_PATH = Path(appdirs.user_config_dir(SERVICE_NAME)) + +LOG_FOLDER = Path.joinpath(SETTINGS_PATH, "logs") +FIRMWARE_FOLDER = Path.joinpath(SETTINGS_PATH, "firmware") +USER_FIRMWARE_FOLDER = Path("/usr/blueos/userdata/firmware") + +APP_FOLDERS = [SETTINGS_PATH, FIRMWARE_FOLDER, LOG_FOLDER, USER_FIRMWARE_FOLDER] + +blueos_files_folder = Path.joinpath(Path.home(), "blueos-files") +defaults_folder = Path.joinpath(blueos_files_folder, "ardupilot-manager/default") __all__ = ["SERVICE_NAME"] diff --git a/core/services/ardupilot_manager/settings.py b/core/services/ardupilot_manager/settings.py index 40b8ba7ae..c13639240 100644 --- a/core/services/ardupilot_manager/settings.py +++ b/core/services/ardupilot_manager/settings.py @@ -20,6 +20,7 @@ class Settings: blueos_files_folder = Path.joinpath(Path.home(), "blueos-files") defaults_folder = Path.joinpath(blueos_files_folder, "ardupilot-manager/default") + sitl_frame = SITLFrame.UNDEFINED preferred_router: Optional[str] = None