added warning levels
This commit is contained in:
@ -61,27 +61,30 @@ string Drive::sCapacityToText()
|
||||
return "ERROR";
|
||||
}
|
||||
|
||||
string Drive::sErrorCountToText(){
|
||||
return to_string(getErrorCount());
|
||||
}
|
||||
string Drive::sErrorCountToText()
|
||||
{
|
||||
return to_string(getErrorCount());
|
||||
}
|
||||
|
||||
|
||||
string Drive::sPowerOnHoursToText(){
|
||||
double dYears = 0U;
|
||||
uint32_t u32Hours = getPowerOnHours();
|
||||
stringstream stream;
|
||||
string Drive::sPowerOnHoursToText()
|
||||
{
|
||||
double dYears = 0U;
|
||||
uint32_t u32Hours = getPowerOnHours();
|
||||
stringstream stream;
|
||||
|
||||
dYears = (double) ((double)u32Hours/(double)8760U);
|
||||
|
||||
stream << fixed << setprecision(2) << dYears;
|
||||
string sRet = to_string(getPowerOnHours()) + " hours or " + stream.str() + " years";
|
||||
dYears = (double) ((double)u32Hours/(double)8760U);
|
||||
|
||||
return sRet;
|
||||
}
|
||||
stream << fixed << setprecision(2) << dYears;
|
||||
string sRet = to_string(getPowerOnHours()) + " hours or " + stream.str() + " years";
|
||||
|
||||
string Drive::sPowerCyclesToText(){
|
||||
return to_string(getPowerCycles());
|
||||
}
|
||||
return sRet;
|
||||
}
|
||||
|
||||
string Drive::sPowerCyclesToText()
|
||||
{
|
||||
return to_string(getPowerCycles());
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief set S.M.A.R.T. values in model
|
||||
|
Reference in New Issue
Block a user