summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2016-06-01 21:28:10 +0200
committerAndré Hartmann <aha_1980@gmx.de>2016-06-02 12:35:24 +0000
commita2d50ccf2ee1248a48560676957cd807855ae2e5 (patch)
tree5234cb32135eeb8f9641105b3784b176394d86ed /src/tools
parent88f5821fe2276a16bb42bd129cca14a0d44b0f16 (diff)
CanBusUtil: Interpret Send-ID as hexadecimal
Appearently, CanBusUtil was inspired by SocketCANs cansend, and this does interpret all input as hexadecimal. Further, the data byte following the hash mark '#' were already used in hex, so let's be consequent. Change-Id: I21324eb540ae2792f747dbae49865973d182d2d9 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/canbusutil/canbusutil.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/canbusutil/canbusutil.cpp b/src/tools/canbusutil/canbusutil.cpp
index d462311..8421caf 100644
--- a/src/tools/canbusutil/canbusutil.cpp
+++ b/src/tools/canbusutil/canbusutil.cpp
@@ -140,7 +140,7 @@ bool CanBusUtil::parseDataField(qint32 &id, QString &payload)
return false;
}
- id = data.left(hashMarkPos).toInt();
+ id = data.left(hashMarkPos).toInt(nullptr, 16);
payload = data.right(data.length() - hashMarkPos - 1);
return true;