From 4ec782307885051976526a082fd0608f0ca520bf Mon Sep 17 00:00:00 2001 From: Kiran Gowda Kempanna Date: Fri, 3 May 2024 11:12:53 +0200 Subject: [PATCH] Update gencode.py Signed-off-by: Rule Timothy (VM/EMT3) --- Taskfile.yml | 2 +- extra/tools/network/build/package/gencode.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 0491175..09a6200 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -140,7 +140,7 @@ tasks: sh: basename {{.DBCFILE}} .dbc OUTDIR: '{{.OUTDIR | default "OUTDIR_NOT_SPECIFIED"}}' FILTER: '{{if .FILTER}}--filter {{.FILTER}}{{else}}{{end}}' - CYCLE_TIME: '{{if .CYCLE_TIME}}--cycle_time {{.CYCLE_TIME}}{{else}}{{end}}' + CYCLE_TIME: "{{if .CYCLE_TIME}}--cycle_time '{{.CYCLE_TIME}}'{{else}}{{end}}" IMAGE: '{{.IMAGE | default .NETWORK_IMAGE}}' TAG: '{{.TAG | default .NETWORK_TAG}}' cmds: diff --git a/extra/tools/network/build/package/gencode.py b/extra/tools/network/build/package/gencode.py index 3cfbf58..983635c 100644 --- a/extra/tools/network/build/package/gencode.py +++ b/extra/tools/network/build/package/gencode.py @@ -51,7 +51,7 @@ def scan_messages(dbc_file, out_path, filter, cycle_time): 'is_container': isContainer } if str(message.frame_id) in cycle_time.keys(): - frames[messageName]['cycle_time_ms'] = cycle_time[str(message.frame_id)] + frames[messageName]['cycle_time_ms'] = int(cycle_time[str(message.frame_id)]) if isContainer : for mux_id, signals in message.signal_tree[0]['Header_ID'].items(): frames[messageName + '_' + hex(mux_id)] = {