Skip to content

Commit

Permalink
xls load: (#762) allow to explicite overwrite factor (#824)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebroecker authored Jan 2, 2025
1 parent d442729 commit f02e080
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/canmatrix/formats/xls.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@ def load(file, **options):
unit = unit.strip()
new_signal.unit = unit
try:
new_signal.factor = float_factory(factor)
# if prevents overwriting explicit factor (if given)
if new_signal.factor in (1, 1.0):
new_signal.factor = float_factory(factor)
except:
logger.warning(
"Some error occurred while decoding scale of Signal %s: '%s'",
Expand Down

0 comments on commit f02e080

Please sign in to comment.