aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-config-generator
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-04-14 15:35:40 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-14 15:35:40 +0200
commit402e3e3d590df79986b63d4ae9b07cc6b399d90b (patch)
treeb4237409c146d97f0ec93f32444e8befdee60a85 /CAN-config-generator
parent49fe0eec8f17698fc5f86d0abe01777af1fb2b23 (diff)
Fix: wrong splitting of can_signals
Signals were separated by message definitions but it is unneeded and make signals separated by message_set. Change-Id: I83cbe687dafc37af0412dc5346837d06be918556 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-config-generator')
-rw-r--r--CAN-config-generator/src/main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/CAN-config-generator/src/main.cpp b/CAN-config-generator/src/main.cpp
index cfefed84..e0240a85 100644
--- a/CAN-config-generator/src/main.cpp
+++ b/CAN-config-generator/src/main.cpp
@@ -225,9 +225,9 @@ void generate(const std::string& header, const std::string& footer, const openxc
<< " {\n";
std::uint32_t message_count = message_set.messages().size();
std::uint32_t index = 0;
+ out << " {\n";
for(const openxc::can_message& m : message_set.messages())
{
- out << " {\n";
std::uint32_t signal_count = m.signals().size();
for(const openxc::signal& s : m.signals())
{
@@ -236,11 +236,10 @@ void generate(const std::string& header, const std::string& footer, const openxc
--signal_count;
out << '\n';
}
- out << " }";
if (index + 1 < message_count) out << ',';
++index;
- out << '\n';
}
+ out << " }\n";
out << " }\n"
<< " , diagnostic_messages_\n"
<< " {\n"