Skip to content

Commit 92146e6

Browse files
committed
utils: dbc_to_rst.py: factor out configuration
That will make it easier to sync the tool between various platforms. Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
1 parent b738af7 commit 92146e6

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

docs/source/utils/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__pycache__

docs/source/utils/dbc_to_rst.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
import cantools
22
from cantools.subparsers.dump import formatting
3+
from dbc_to_rst_config import *
34

45
# Load the DBC file
56
db = cantools.database.load_file("uart_com.dbc")
67

7-
# Messages you want to document
8-
target_msgs = ["ChargeControl2", "ChargeState2", "PT1000State", "FirmwareVersion", "GitHash", "InquiryPacket"]
9-
10-
# Sender name mapping
11-
sender_name_map = {
12-
"CCY_SafetyController": "Safety Controller",
13-
"CCY_Linux": "Linux Processor"
14-
}
15-
16-
# Senders to exclude from display
17-
excluded_senders = {"Default_SafetyController"}
18-
198
# Extract a signal row as a list of strings
209
def signal_row(signal):
2110
def safe(value):
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Messages you want to document
2+
target_msgs = ["ChargeControl2", "ChargeState2", "PT1000State", "FirmwareVersion", "GitHash", "InquiryPacket"]
3+
4+
# Sender name mapping
5+
sender_name_map = {
6+
"CCY_SafetyController": "Safety Controller",
7+
"CCY_Linux": "Linux Processor"
8+
}
9+
10+
# Senders to exclude from display
11+
excluded_senders = {"Default_SafetyController"}

0 commit comments

Comments
 (0)