summaryrefslogtreecommitdiffstats
path: root/CAN-config-generator/src/openxc/signal.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-17 14:32:14 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-19 11:36:43 +0200
commitaab3313042e28f4cbf85b36564bfc3e5e39ffac4 (patch)
treecc330ef5b21256f98121e3cfcf5d0bbd1fefb7a0 /CAN-config-generator/src/openxc/signal.cpp
parent8c1f3c953e5e66e421b0a75ce26853ac848d6b54 (diff)
Fix: Generator compilation warnings.
Change-Id: Ib9267901da5f0cddd191b5736e47b43c696a85e6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-config-generator/src/openxc/signal.cpp')
-rwxr-xr-xCAN-config-generator/src/openxc/signal.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/CAN-config-generator/src/openxc/signal.cpp b/CAN-config-generator/src/openxc/signal.cpp
index 6c3ff82a..e9c1088b 100755
--- a/CAN-config-generator/src/openxc/signal.cpp
+++ b/CAN-config-generator/src/openxc/signal.cpp
@@ -34,7 +34,7 @@ namespace openxc
return factor_;
}
- std::uint32_t signal::offset() const
+ float signal::offset() const
{
return offset_;
}
@@ -90,11 +90,11 @@ namespace openxc
bit_position_ = j.count("bit_position") ? j["bit_position"].get<std::uint32_t>() : 0;
bit_size_ = j.count("bit_size") ? j["bit_size"].get<std::uint32_t>() : 0;
factor_ = j.count("factor") ? j["factor"].get<float>() : 1.0f;
- offset_ = j.count("offset") ? j["offset"].get<std::uint32_t>() : 0;
+ offset_ = j.count("offset") ? j["offset"].get<float>() : 0.0f;
decoder_ = j.count("decoder") ? j["decoder"].get<std::string>() : "";
ignore_ = j.count("ignore") ? j["ignore"].get<bool>() : false;
enabled_ = j.count("enabled") ? j["enabled"].get<bool>() : true;
- max_frequency_ = j.count("max_frequency") ? j["max_frequency"].get<std::uint32_t>() : 0;
+ max_frequency_ = j.count("max_frequency") ? j["max_frequency"].get<float>() : 0.0f;
send_same_ = j.count("send_same") ? j["send_same"].get<bool>() : true;
force_send_changed_ = j.count("force_send_changed") ? j["force_send_changed"].get<bool>() : false;
writable_ = j.count("writable") ? j["writable"].get<bool>() : false;