[supervision] Adds documentation tab. (#2972)

* [supervision] Adds documentation tab.

* [generator] add a target option to dump modules by target with load type

* [supervision] doc: handle modules type.

* [supervision] modules doc: add filter.

* [supervision] Use internet doc by default.

* [supervision] Move the header out of the configuration tab.

* [supervision] Add target label.

* [supervision] Gracefully handle Ctrl-C.

* [supervision] Add new session to combobox.

* Update sw/supervision/python/doc_panel.py

---------

Co-authored-by: Gautier Hattenberger <gautier.hattenberger@enac.fr>
This commit is contained in:
Fabien-B
2023-02-07 15:51:55 +01:00
committed by GitHub
parent 902f9adf65
commit 8833bb4fc5
38 changed files with 1024 additions and 371 deletions
+9 -1
View File
@@ -18,12 +18,20 @@ PAPARAZZI_HOME = os.getenv("PAPARAZZI_HOME", PAPARAZZI_SRC)
CONF_DIR = os.path.join(PAPARAZZI_HOME, "conf/")
def removeprefix(string: str, prefix: str, /) -> str:
def remove_prefix(string: str, prefix: str, /) -> str:
if string.startswith(prefix):
return string[len(prefix):]
else:
return string[:]
def remove_suffix(s: str, suffix: str, /) -> str:
if s.endswith(suffix):
return s[:-len(suffix)]
else:
return s
# TODO: make it work with shell program such as vim.
def edit_file(file_path, prefix=CONF_DIR):
path = prefix + file_path