diff --git a/src/lib/ebus/data.cpp b/src/lib/ebus/data.cpp index ff848534..a41b41ae 100644 --- a/src/lib/ebus/data.cpp +++ b/src/lib/ebus/data.cpp @@ -291,9 +291,7 @@ void SingleDataField::dump(ostream& output) else if (m_partType == pt_slaveData) output << "s"; output << FIELD_SEPARATOR; - if (!m_dataType->dump(output, m_length)) { // no divisor appended - output << FIELD_SEPARATOR; // no value list, no divisor - } + m_dataType->dump(output, m_length); dumpString(output, m_unit); dumpString(output, m_comment); } @@ -536,10 +534,6 @@ void ValueListDataField::dump(ostream& output) if (!m_dataType->dump(output, m_length)) { // no divisor appended bool first = true; for (map::iterator it = m_values.begin(); it != m_values.end(); it++) { - if (first) - first = false; - else - output << VALUE_SEPARATOR; output << static_cast(it->first) << "=" << it->second; } } // TODO else does not fit into CSV format! diff --git a/src/lib/ebus/datatype.h b/src/lib/ebus/datatype.h index 0acbcbd3..5ec90716 100644 --- a/src/lib/ebus/datatype.h +++ b/src/lib/ebus/datatype.h @@ -194,7 +194,7 @@ public: /** * Dump the type identifier with the specified length and optionally the - * divisor to the output. + * divisor to the output (@a FIELD_SEPARATOR is always appended!). * @param output the @a ostream to dump to. * @param length the number of symbols to read/write. * @return true when a non-default divisor was written to the output.