summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Guyader <arthur.guyader@iot.bzh>2019-07-31 14:46:38 +0200
committerArthur Guyader <arthur.guyader@iot.bzh>2019-08-07 14:27:24 +0200
commitafa9e975060169168853700c06736ab519e996ee (patch)
tree6677a9c73b0825afb56da9bd0beb6e128845f63d
parentf61a6cb23ab86da2b3d477276886f1e73ec5c88c (diff)
Add some modifications (space, new line, coma, float).
This commit adds some modifications for code readability and to remove compilation warnings in low can. Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Change-Id: Ia85f94125c1e9ff41cda60f027ab7213c8f378dc
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ac7ce4b..9f7969f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -151,7 +151,7 @@ std::ostream& operator<<(std::ostream& o, const generator<openxc::signal>& v)
<< v.line_prefix_ << "\t" << v.v_.bit_position() << ",// bit_position\n"
<< v.line_prefix_ << "\t" << v.v_.bit_size() << ",// bit_size\n"
<< v.line_prefix_ << "\t" << gen(v.v_.factor()) << ",// factor\n"
- << v.line_prefix_ << "\t" << v.v_.offset() << ",// offset\n"
+ << v.line_prefix_ << "\t" << gen(v.v_.offset()) << ",// offset\n"
<< v.line_prefix_ << "\t" << "0,// min_value\n"
<< v.line_prefix_ << "\t" << "0,// max_value\n"
<< v.line_prefix_ << "\tfrequency_clock_t(" << gen(v.v_.max_frequency()) << "),// frequency\n"
@@ -168,11 +168,11 @@ std::ostream& operator<<(std::ostream& o, const generator<openxc::signal>& v)
}else{
multi_first = "false";
}
- std::string multi = "std::make_pair<bool, int>(" + multi_first + "," + std::to_string(v.v_.multiplex().second) + ")";
+ std::string multi = "std::make_pair<bool, int>(" + multi_first + ", " + std::to_string(v.v_.multiplex().second) + ")";
o << v.line_prefix_ << '\t' << multi << ",// multiplex\n"
<< v.line_prefix_ << '\t' << v.v_.is_big_endian() << ",// is_big_endian\n"
<< v.line_prefix_ << '\t' << v.v_.is_signed() << ",// is_signed\n"
- << v.line_prefix_ << "\t" << gen(v.v_.unit()) << ",// unit\n"
+ << v.line_prefix_ << "\t" << gen(v.v_.unit()) << "// unit\n"
<< v.line_prefix_ << "})}";
return o;
}
@@ -200,7 +200,7 @@ std::ostream& operator<<(std::ostream& o, const generator<openxc::can_message>&
o << "frequency_clock_t(" << gen(v.v_.max_frequency()) << "),"
<< gen(v.v_.force_send_changed()) << ",";
std::uint32_t index = 0;
- o << "\t\t\t\t\t{ // beginning signals vector\n";
+ o << "\n\t\t\t\t\t{ // beginning signals vector\n";
std::uint32_t signal_count = (uint32_t)v.v_.signals().size();
for(const openxc::signal& s : v.v_.signals())
{