Wrapper for settings JSON.
More...
|
None | __init__ (self, dict[str, str] settings_dict) |
|
None | load (self, dict[str, str] settings_dict) |
| Loads settings dict.
|
|
None | print_settings (self) |
| Print the current settings.
|
|
None | unload (self, TextIOBase file) |
| Write settings to file.
|
|
|
| FRONT_TEENSY_PORT |
|
| getter |
|
| BACK_TEENSY_PORT = Option("BACK_TEENSY_PORT", "Port representing the back ecu (COMx)", getter=lambda x: x.upper()) |
|
| GRAPH_ARG |
|
| CORE_MODEL = Option("CORE_MODEL", "Model number of the teensy to compile for", (36, 40, 41), default=41) |
|
| LOGGING_OPTION |
|
| CORE_SPEED = Option("CORE_SPEED", "Speed at which the CPU will run (MHz)", default="AUTOSET VALUE", advanced=True) |
|
| CORE_NAME = Option("CORE_NAME", "Model of the cpu", default="AUTOSET VALUE", advanced=True) |
|
| CORE = Option("CORE", "Core folder to compile with", default="AUTOSET VALUE", advanced=True) |
|
| BAUDRATE = Option("BAUDRATE", "Baudrate to use with serial", (9600, 19200, 38400, 57600, 115200), default=115200, advanced=True) |
|
| USB_SETTING = Option("USB_SETTING", "USB behavior of the core", default="USB_SERIAL", advanced=True) |
|
| TOOLCHAIN_OFFSET = Option("TOOLCHAIN_OFFSET", "Offset to the toolchain", default="../TeensyToolchain", advanced=True) |
|
| ADDITIONAL_CMAKE_VARS |
|
tuple | options |
|
dict | settings [str, str] |
|
Wrapper for settings JSON.
Definition at line 122 of file vs_conf.py.
◆ __init__()
None vs_conf.Settings.__init__ |
( |
|
self, |
|
|
dict[str, str] |
settings_dict |
|
) |
| |
◆ load()
None vs_conf.Settings.load |
( |
|
self, |
|
|
dict[str, str] |
settings_dict |
|
) |
| |
Loads settings dict.
Args: settings_dict (dict[str, str]): settings dict
Raises: KeyError: Key is not found in the settings JSON
Definition at line 268 of file vs_conf.py.
◆ print_settings()
None vs_conf.Settings.print_settings |
( |
|
self | ) |
|
Print the current settings.
Definition at line 284 of file vs_conf.py.
◆ unload()
None vs_conf.Settings.unload |
( |
|
self, |
|
|
TextIOBase |
file |
|
) |
| |
Write settings to file.
Args: file (TextIOBase): The file to write to
Definition at line 289 of file vs_conf.py.
◆ ADDITIONAL_CMAKE_VARS
vs_conf.Settings.ADDITIONAL_CMAKE_VARS |
|
static |
Initial value:= Option(
"ADDITIONAL_CMAKE_VARS", "More defines passed to CMake", default="-DCUSTOM_BUILD_PATH_PREFIX:STRING=build/Pre_Build/", advanced=True
)
Definition at line 217 of file vs_conf.py.
◆ BACK_TEENSY_PORT
vs_conf.Settings.BACK_TEENSY_PORT = Option("BACK_TEENSY_PORT", "Port representing the back ecu (COMx)", getter=lambda x: x.upper()) |
|
static |
◆ BAUDRATE
vs_conf.Settings.BAUDRATE = Option("BAUDRATE", "Baudrate to use with serial", (9600, 19200, 38400, 57600, 115200), default=115200, advanced=True) |
|
static |
◆ CORE
vs_conf.Settings.CORE = Option("CORE", "Core folder to compile with", default="AUTOSET VALUE", advanced=True) |
|
static |
◆ CORE_MODEL
vs_conf.Settings.CORE_MODEL = Option("CORE_MODEL", "Model number of the teensy to compile for", (36, 40, 41), default=41) |
|
static |
◆ CORE_NAME
vs_conf.Settings.CORE_NAME = Option("CORE_NAME", "Model of the cpu", default="AUTOSET VALUE", advanced=True) |
|
static |
◆ CORE_SPEED
vs_conf.Settings.CORE_SPEED = Option("CORE_SPEED", "Speed at which the CPU will run (MHz)", default="AUTOSET VALUE", advanced=True) |
|
static |
◆ FRONT_TEENSY_PORT
vs_conf.Settings.FRONT_TEENSY_PORT |
|
static |
◆ getter
◆ GRAPH_ARG
vs_conf.Settings.GRAPH_ARG |
|
static |
Initial value:= Option(
"GRAPH_ARG",
"Enable graphical plotting of data",
("yes", "no"),
lambda x: "yes" if x in ("-g", "yes") else "",
lambda x: "-g" if x == "yes" else "",
default="no",
)
Definition at line 194 of file vs_conf.py.
◆ LOGGING_OPTION
vs_conf.Settings.LOGGING_OPTION |
|
static |
Initial value:= Option(
"LOGGING_OPTION",
"Enable logging",
("yes", "no"),
lambda x: "yes" if x in ("-l${workspaceFolder}\\logs", "yes") else "",
lambda x: "-l${workspaceFolder}\\logs" if x == "yes" else "",
default="yes",
)
Definition at line 203 of file vs_conf.py.
◆ options
tuple vs_conf.Settings.options |
|
static |
Initial value:= (
CORE_MODEL,
FRONT_TEENSY_PORT,
BACK_TEENSY_PORT,
LOGGING_OPTION,
GRAPH_ARG,
CORE_SPEED,
CORE_NAME,
CORE,
BAUDRATE,
USB_SETTING,
TOOLCHAIN_OFFSET,
ADDITIONAL_CMAKE_VARS,
)
Definition at line 221 of file vs_conf.py.
◆ settings [1/2]
dict vs_conf.Settings.settings [str, str] |
|
static |
◆ settings [2/2]
vs_conf.Settings.settings |
◆ TOOLCHAIN_OFFSET
vs_conf.Settings.TOOLCHAIN_OFFSET = Option("TOOLCHAIN_OFFSET", "Offset to the toolchain", default="../TeensyToolchain", advanced=True) |
|
static |
◆ USB_SETTING
vs_conf.Settings.USB_SETTING = Option("USB_SETTING", "USB behavior of the core", default="USB_SERIAL", advanced=True) |
|
static |
The documentation for this class was generated from the following file: