From 757a29d0137b974fff6ddcc945d76e69ae120ecb Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 21 Mar 2022 13:00:36 +0100 Subject: refactor: use MPU6050_light & clean up bloat --- src/common/conversion.cpp | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 src/common/conversion.cpp (limited to 'src/common/conversion.cpp') diff --git a/src/common/conversion.cpp b/src/common/conversion.cpp deleted file mode 100644 index b016537..0000000 --- a/src/common/conversion.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "conversion.hpp" - -#include -#include - -namespace common -{ - -common::UniquePtr doubleToStr(double num, unsigned int width, - unsigned int precision) -{ - auto str = common::make_unique(width + precision); - - dtostrf(num, static_cast(width), static_cast(precision), - str->c_str); - - return str; -} - -common::UniquePtr intToStr(int num) -{ - auto width = static_cast(log10(num)); - - auto str = common::make_unique(width + 1U); - - dtostrf(num, static_cast(width + 1U), 0U, str->c_str); - - return str; -} - -common::UniquePtr uintToStr(unsigned int num) -{ - auto width = static_cast(log10(num)); - - auto str = common::make_unique(width + 1U); - - dtostrf(num, static_cast(width + 1U), 0U, str->c_str); - - return str; -} - -} // namespace common -- cgit v1.2.3-18-g5258