eive-obsw/generators/definitions.py
Robin Mueller 77042ef297
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
fixes all generator scripts
2022-02-26 14:08:11 +01:00

24 lines
514 B
Python

import os
import enum
from pathlib import Path
def determine_obsw_root_path() -> str:
for _ in range(5):
if os.path.exists("CMakeLists.txt"):
return os.curdir
else:
os.chdir("..")
PATH_VAR_ROOT = os.path.dirname(os.path.realpath(__file__))
ROOT_DIR = PATH_VAR_ROOT
OBSW_ROOT_DIR = Path(determine_obsw_root_path())
DATABASE_NAME = "eive_mod.db"
class BspType(enum.Enum):
BSP_Q7S = "bsp_q7s"
BSP_HOSTED = "bsp_hosted"
BSP_LINUX_BOARD = "bsp_linux_board"