-
Notifications
You must be signed in to change notification settings - Fork 406
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
when xsl2dbc,singal's offset 、mini is uncorrect #762
Labels
Comments
please try |
my test script: FN=test_db
canconvert ${FN}.dbc ${FN}.xlsx --dbcImportEncoding GBK --dbcImportCommentEncoding GBK --additionalSignalAttributes min,max,offset,factor
canconvert ${FN}.xlsx ${FN}.xlsx.dbc --dbcExportEncoding GBK --dbcExportCommentEncoding GBK
cancompare ${FN}.dbc ${FN}.xlsx.dbc > ${FN}.xlsx.log min,max,offset work as expect, but factor not.
In the ${FN}.xlsx
It seems that # xls.load function, about line:552
factor = sh.cell(row_num, index['function']).value
if isinstance(factor, past.builtins.basestring):
factor = factor.strip()
if " " in factor and factor[0].isdigit():
(factor, unit) = factor.strip().split(" ", 1)
factor = factor.strip()
unit = unit.strip()
new_signal.unit = unit
try:
# only update when factor is default
if new_signal.factor in (1, 1.0): # <== here
new_signal.factor = float_factory(factor)
except:
logger.warning(
"Some error occurred while decoding scale of Signal %s: '%s'",
signal_name,
sh.cell(row_num, index['function']).value)
else:
unit = factor.strip()
new_signal.unit = unit
new_signal.factor = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
version:1.0
when change a xls file to dbc file.All singals' offset and mini is 0,not value in xls.
The text was updated successfully, but these errors were encountered: