started to use the UI
This commit is contained in:
@ -46,6 +46,18 @@ uint32_t Drive::getPowerCycles(void)
|
||||
return u32PowerCycles;
|
||||
}
|
||||
|
||||
string Drive::sCapacityToText(){
|
||||
if(getCapacity() <= (999*1000000000U)){
|
||||
// Less or even 999 GB --> GB
|
||||
return to_string(getCapacity() / 1000000000U) + " GB";
|
||||
}
|
||||
else{
|
||||
// More 999 GB --> TB
|
||||
return to_string(getCapacity() / 1000000000000U) + " TB";
|
||||
}
|
||||
return "ERROR";
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief set S.M.A.R.T. values in model
|
||||
* \param string modelFamily
|
||||
|
Reference in New Issue
Block a user