select drive based on arrow keys

This commit is contained in:
2020-08-07 11:38:00 +02:00
parent a92a9c2a2a
commit 1b0ea97ed1
7 changed files with 355 additions and 267 deletions

View File

@ -46,15 +46,18 @@ uint32_t Drive::getPowerCycles(void)
return u32PowerCycles;
}
string Drive::sCapacityToText() {
if(getCapacity() <= (999*1000000000UL)) {
// Less or even 999 GB --> GB
return to_string(getCapacity() / 1000000000UL) + " GB";
}
else {
// More 999 GB --> TB
return to_string(getCapacity() / 1000000000000UL) + " TB";
}
string Drive::sCapacityToText()
{
if(getCapacity() <= (999*1000000000UL))
{
// Less or even 999 GB --> GB
return to_string(getCapacity() / 1000000000UL) + " GB";
}
else
{
// More 999 GB --> TB
return to_string(getCapacity() / 1000000000000UL) + " TB";
}
return "ERROR";
}