diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2019-11-26 16:07:09 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2019-11-26 16:07:09 +0100 |
commit | 55b610b027b74e70228f5fe51c42c71de9e16a7c (patch) | |
tree | 6677a9c73b0825afb56da9bd0beb6e128845f63d | |
parent | 4bcdc144dd07be8fd1dae1d8636200a0280d4d90 (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.
Bug-AGL: SPEC-2976
Change-Id: Ia85f94125c1e9ff41cda60f027ab7213c8f378dc
Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh>
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r-- | src/main.cpp | 8 |
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())
{
|