SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
vs_conf.py File Reference

Generate configuration files for compilation, intellisense, and post operations. More...

Go to the source code of this file.

Classes

class  vs_conf.Settings
 Wrapper for settings JSON. More...
 
class  vs_conf.Settings.Option
 Key wrapper class. More...
 
class  vs_conf.PortPrinter
 

Functions

str vs_conf.comment_remover (str text)
 Remove C style comments from a str.
 
dict[str, str] vs_conf.load_json ()
 Load the settings JSON.
 
list[str] vs_conf.serial_ports ()
 Lists serial port names when on windows.
 
str vs_conf.listify (Sequence seq)
 Convert sequence to a conventional string list.
 
None vs_conf.writeBackup ()
 Output the backup settings.
 
Settings vs_conf.get_settings ()
 Return the current settings or fallback to the backup.
 
 vs_conf.main ()
 Main function.
 

Variables

str vs_conf.SETTINGS_PATH = ".vscode/settings.json"
 
str vs_conf.DOCUMENTATION_URL = "https://illinois-tech-motorsports.github.io/IIT-SAE-ECU/md__github_workspace__c_o_n_t_r_i_b_u_t_i_n_g.html"
 
str vs_conf.TOOLCHAIN_REPO = "https://github.com/LeHuman/TeensyToolchain"
 
str vs_conf.BACKUP_SET
 

Detailed Description

Generate configuration files for compilation, intellisense, and post operations.

Author
IR
Version
0.1
Date
2022-01-06

Definition in file vs_conf.py.

Function Documentation

◆ comment_remover()

str vs_conf.comment_remover ( str  text)

Remove C style comments from a str.

Args: text (str): str to remove comments from

Returns: str: text with removed comments

Definition at line 55 of file vs_conf.py.

◆ get_settings()

Settings vs_conf.get_settings ( )

Return the current settings or fallback to the backup.

Returns: Settings: The active settings

Definition at line 337 of file vs_conf.py.

◆ listify()

str vs_conf.listify ( Sequence  seq)

Convert sequence to a conventional string list.

Args: seq (Sequence): Sequence object

Returns: str: the conventional string list

Definition at line 107 of file vs_conf.py.

◆ load_json()

dict[str, str] vs_conf.load_json ( )

Load the settings JSON.

Returns: dict[str, str]: the JSON as a dict

Definition at line 77 of file vs_conf.py.

◆ main()

vs_conf.main ( void  )

Main function.

Definition at line 353 of file vs_conf.py.

◆ serial_ports()

list[str] vs_conf.serial_ports ( )

Lists serial port names when on windows.

Returns: list[str]: A list of the serial ports available on a win system

Definition at line 88 of file vs_conf.py.

◆ writeBackup()

None vs_conf.writeBackup ( )

Output the backup settings.

Definition at line 331 of file vs_conf.py.

Variable Documentation

◆ BACKUP_SET

str vs_conf.BACKUP_SET
Initial value:
1= """{
2 "FRONT_TEENSY_PORT": "COM3",
3 "BACK_TEENSY_PORT": "COM10",
4 "BAUDRATE": "115200",
5 "GRAPH_ARG": "",
6 "CORE": "teensy4",
7 "CORE_MODEL": "41",
8 "CORE_NAME": "MK66FX1M0",
9 "CORE_SPEED": "180000000",
10 "USB_SETTING": "USB_SERIAL",
11 "LOGGING_OPTION": "-l${workspaceFolder}/logs",
12 "TOOLCHAIN_OFFSET": "../TeensyToolchain",
13 "ADDITIONAL_CMAKE_VARS": "-DCUSTOM_BUILD_PATH_PREFIX:STRING=build/Pre_Build/",
14 "CMAKE_FINAL_VARS": "-DENV_CORE_SPEED:STRING=${config:CORE_SPEED} -DENV_CORE_MODEL:STRING=${config:CORE_MODEL} -DENV_USB_SETTING:STRING=${config:USB_SETTING} ${config:ADDITIONAL_CMAKE_VARS}",
15 "doxygen_runner.configuration_file_override": "${workspaceFolder}/docs/Doxyfile",
16 "python.linting.pylintEnabled": true,
17 "python.linting.enabled": true,
18 "python.linting.flake8Enabled": false,
19 "C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Attach, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4 }",
20 "search.exclude": {
21 "**/build": true
22 },
23 "files.watcherExclude": {
24 "**/build": true
25 }
26}"""

Definition at line 27 of file vs_conf.py.

◆ DOCUMENTATION_URL

str vs_conf.DOCUMENTATION_URL = "https://illinois-tech-motorsports.github.io/IIT-SAE-ECU/md__github_workspace__c_o_n_t_r_i_b_u_t_i_n_g.html"

Definition at line 24 of file vs_conf.py.

◆ SETTINGS_PATH

str vs_conf.SETTINGS_PATH = ".vscode/settings.json"

Definition at line 23 of file vs_conf.py.

◆ TOOLCHAIN_REPO

str vs_conf.TOOLCHAIN_REPO = "https://github.com/LeHuman/TeensyToolchain"

Definition at line 25 of file vs_conf.py.