Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arxml fix #564

Merged
merged 3 commits into from
Apr 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/canmatrix/formats/arxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ def get_signals(signal_array, frame, ea, multiplex_id, float_factory, bit_offset

if system_signal is not None and "SYSTEM-SIGNAL-GROUP" in system_signal.tag:
system_signals = ea.find_children_by_path(system_signal, "SYSTEM-SIGNAL-REFS/SYSTEM-SIGNAL")
get_sys_signals(system_signal, system_signals, frame, group_id, ns)
get_sys_signals(system_signal, system_signals, frame, group_id, ea)

group_id = group_id + 1
continue
Expand Down Expand Up @@ -1231,7 +1231,7 @@ def get_signals(signal_array, frame, ea, multiplex_id, float_factory, bit_offset

if initvalue is not None and initvalue.text is not None:
initvalue.text = canmatrix.utils.guess_value(initvalue.text)
new_signal.initial_value = float_factory(initvalue.text)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am in discussion, if raw_value or physical value should be stored in intial_value (#567)
so we should wait here

new_signal.initial_value = (float_factory(initvalue.text) * factor) + offset

for key, value in list(values.items()):
new_signal.add_values(canmatrix.utils.decode_number(key, float_factory), value)
Expand Down