Closed pgrandin closed 2 years ago
Here are the first 10 encountered errors:
gps.cpp(7): error cpplint: [build/include_subdir] Include the directory when naming header files [4]
gps.cpp(8): error cpplint: [build/include_subdir] Include the directory when naming header files [4]
gps.cpp(142): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(317): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(448): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(457): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(462): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(465): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(497): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
Done processing gps.cpp Done processing gps.h Category 'build' errors found: 4 Category 'whitespace' errors found: 8 Total errors found: 12
Here are the first 10 encountered errors:
gps.cpp(7): error cpplint: [build/include_subdir] Include the directory when naming header files [4]
gps.cpp(8): error cpplint: [build/include_subdir] Include the directory when naming header files [4]
gps.cpp(142): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(315): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(443): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(452): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(457): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(460): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
gps.cpp(492): error cpplint: [whitespace/line_length] Lines should be <= 120 characters long [2]
Done processing gps.cpp Done processing gps.h Category 'build' errors found: 4 Category 'whitespace' errors found: 8 Total errors found: 12
The previous code was doing qstring to double conversion, then converting the values back to qstring for storage/usage. Using float here makes more sense, is more memory efficient, and according to the benchmark below is also quite faster than manipulating strings.
This also opens up possibilities to leverage signal/slots for consumers of gps updates, like the laptimer or the telemetry without having to call their handlers explicitly (like we do with
checknewLap();
currently, where the laptracker could actually be inactive).Benchmark results:
Benchmark code: