started to use the UI

This commit is contained in:
2020-08-04 22:35:29 +02:00
parent 89f900c970
commit 9322ea65a7
9 changed files with 180 additions and 131 deletions

View File

@ -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