namespace {
const std::string kMemoryStateNormal = "NORMAL";
const std::string kMemoryStateWarinig = "WARNING";
-const double kDisplayInchToMillimeter = 2.54;
+const double kDisplayInchToMillimeter = 25.4;
//Battery
const double kRemainingBatteryChargeMax = 100.0;
const int kVconfErrorNone = 0;
//FETCH PHYSICAL WIDTH
if (dotsPerInchWidth != 0 && screenWidth != 0) {
- physicalWidth = (screenWidth / dotsPerInchWidth) * kDisplayInchToMillimeter;
+ physicalWidth = (static_cast<double>(screenWidth) / dotsPerInchWidth) * kDisplayInchToMillimeter;
} else {
std::string log_msg = "Failed to get physical screen width value";
LoggerE("%s, screenWidth : %d, dotsPerInchWidth: %d", log_msg.c_str(),
//FETCH PHYSICAL HEIGHT
if (dotsPerInchHeight != 0 && screenHeight != 0) {
- physicalHeight = (screenHeight / dotsPerInchHeight) * kDisplayInchToMillimeter;
+ physicalHeight = (static_cast<double>(screenHeight) / dotsPerInchHeight) * kDisplayInchToMillimeter;
} else {
std::string log_msg = "Failed to get physical screen height value";
LoggerE("%s, screenHeight : %d, dotsPerInchHeight: %d", log_msg.c_str(),