-
Notifications
You must be signed in to change notification settings - Fork 46
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
dbcparser parses factor incorrectly #21
Comments
Which version of CANdevStudio are you using? There was a fix for floating point factors here: 8dfed1a This fix should be a part of version 1.0 already. |
I use version 1.0 release. I built from source with a more recent version, but only peakcan and tinycan were existed as CanDevice backend. That's why I still use standalone version of the v1.0.0. |
It works for me with CANdb 8dfed1a that is set by default. |
After your response, I've been trying to build from source and I succeeded eventually. I tested with 8dfed1a but no change. I also used the revisions that can be seen below which are latest ones, still no change. Factors are still incorrect. I can't find any valid reason. Sorry, my response took some time since I had problems with Qt installations. |
I have found the culprit which was the std::stof (used in dbcparser) as mentioned here. std::stof was using "," decimal point separator due to my locale settings. |
Using |
I would never expect that locale settings can have impact on CANdb functionality... good work in figuring this out! I will create fix for this. Thanks. |
… functions may produce wrong results Signed-off-by: Remigiusz Kołłątaj <[email protected]>
#22 does solve the problem. |
… functions may produce wrong results (#22) Signed-off-by: Remigiusz Kołłątaj <[email protected]>
#22 merged. I'm closing this ticket |
For me this issue still occurs. I'm using Ubuntu 18.04. and compiled CANdevStudio from source (GENIVI/CANdevStudio@f580097) which should already have the fix (CANdb commit 054c7ff) Switching my system locale from "German" to "United States" fixes the issue and the factors are parsed correctly. |
I use "ford_cgea1_2_bodycan_2011.dbc" for testing CDS, it succesfuly parses (actually it is the reason I am using it, from this issue). I was trying to send signal using CanSignalSender, but cansignalencoder gave the following error.
[cds] [error] [signalToRaw():cansignalencoder_p.cpp@104] Factor for HvacEvap_Te_Offst signal is 0! Singal encoding failed.
I tracked error a little bit and found out that factor of can message is parsed incorrectly as 0. Then checked other messages and found that all factors are parsed as integers (by observing CanSignalData block) and they are floor'ed. Table can be seen in the figure below.
The message I am playing is the one with id 0x326 and it is given below.
The text was updated successfully, but these errors were encountered: