summaryrefslogtreecommitdiffstats
path: root/CAN-config-generator/src/openxc/can_message.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/can_message.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/can_message.cpp')
-rwxr-xr-xCAN-config-generator/src/openxc/can_message.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/CAN-config-generator/src/openxc/can_message.cpp b/CAN-config-generator/src/openxc/can_message.cpp
index fab5a85f..40e897b2 100755
--- a/CAN-config-generator/src/openxc/can_message.cpp
+++ b/CAN-config-generator/src/openxc/can_message.cpp
@@ -69,8 +69,8 @@ namespace openxc
name_ = j.count("name") ? j["name"].get<std::string>() : "";
handlers_ = j.count("handlers") ? j["handlers"].get<std::vector<std::string>>() : std::vector<std::string>();
enabled_ = j.count("enabled") ? j["enabled"].get<bool>() : true;
- max_frequency_ = j.count("max_frequency") ? j["max_frequency"].get<float>() : 0;
- max_signal_frequency_ = j.count("max_signal_frequency") ? j["max_signal_frequency"].get<float>() : 0;
+ max_frequency_ = (float)j.count("max_frequency") ? j["max_frequency"].get<float>() : 5;
+ max_signal_frequency_ = j.count("max_signal_frequency") ? j["max_signal_frequency"].get<float>() : 5;
force_send_changed_ = j.count("force_send_changed") ? j["force_send_changed"].get<bool>() : true;
force_send_changed_signals_ = j.count("force_send_changed_signals") ? j["force_send_changed_signals"].get<bool>() : false;
@@ -89,7 +89,7 @@ namespace openxc
std::uint32_t can_message::get_signals_count() const
{
- return signals_.size();
+ return (uint32_t)signals_.size();
}
nlohmann::json can_message::to_json() const