Merge branch 'develop' into master
This commit is contained in:
commit
555da195b2
|
@ -63,8 +63,8 @@ void reHDD::app_logic(void)
|
|||
mxScannDrives.lock();
|
||||
char dummy;
|
||||
read (fdNewDrivesInformPipe[0],&dummy,1);
|
||||
filterNewDrives(&vecDrives, &vecNewDrives); //filter and copy to app logic vector
|
||||
printDrives(&vecDrives);
|
||||
filterNewDrives(&listDrives, &listNewDrives); //filter and copy to app logic vector
|
||||
printDrives(&listDrives);
|
||||
mxScannDrives.unlock();
|
||||
}
|
||||
if(FD_ISSET(fdShredInformPipe[0], &selectSet))
|
||||
|
@ -76,7 +76,7 @@ void reHDD::app_logic(void)
|
|||
#endif
|
||||
}
|
||||
//mxScannDrives.lock();
|
||||
ui->updateTUI(&vecDrives, u8SelectedEntry);
|
||||
ui->updateTUI(&listDrives, u8SelectedEntry);
|
||||
//mxScannDrives.unlock();
|
||||
} //endless loop
|
||||
thDevices.join();
|
||||
|
@ -215,11 +215,11 @@ void reHDD::ThreadDelete()
|
|||
getSelectedDrive()->state = Drive::TaskState::NONE; //delete finished
|
||||
getSelectedDrive()->bWasDeleteted = true;
|
||||
Logger::logThis()->info("Finished delete for: " + getSelectedDrive()->getModelName() + "-" + getSelectedDrive()->getSerial());
|
||||
ui->updateTUI(&vecDrives, u8SelectedEntry);
|
||||
ui->updateTUI(&listDrives, u8SelectedEntry);
|
||||
}
|
||||
}
|
||||
|
||||
void reHDD::filterNewDrives(vector <Drive>* pvecOldDrives, vector <Drive>* pvecNewDrives)
|
||||
void reHDD::filterNewDrives(list <Drive>* plistOldDrives, list <Drive>* plistNewDrives)
|
||||
{
|
||||
list <Drive>::iterator itOld; //Iterator for current (old) drive list
|
||||
list <Drive>::iterator itNew; //Iterator for new drive list that was created from to scann thread
|
||||
|
@ -429,8 +429,8 @@ void reHDD::printDrives(list <Drive>* plistDrives)
|
|||
cout << endl;*/
|
||||
|
||||
ostringstream address;
|
||||
address << (void const *)&pvecDrives->at(it - pvecDrives->begin());
|
||||
Logger::logThis()->info(to_string(it - pvecDrives->begin()) + ": " + it->getPath() + " - " + it->getModelFamily() + " - " + it->getSerial() + " @" + address.str());
|
||||
address << (void const *)&(*it);
|
||||
Logger::logThis()->info(to_string(u8Index++) + ": " + it->getPath() + " - " + it->getModelFamily() + " - " + it->getSerial() + " @" + address.str());
|
||||
}
|
||||
Logger::logThis()->info("------------DRIVES END--------------");
|
||||
//cout << "---------------------------------" << endl;
|
||||
|
|
|
@ -83,7 +83,7 @@ void TUI::updateTUI(list <Drive>* plistDrives, uint8_t u8SelectedEntry)
|
|||
if(u8SelectedEntry == u8Index)
|
||||
{
|
||||
bSelectedEntry = true; //mark this drive in entries list
|
||||
displaySelectedDrive(pvecDrives->at(u8SelectedEntry), u16StdscrX, u16StdscrY);
|
||||
displaySelectedDrive(*it, u16StdscrX, u16StdscrY);
|
||||
|
||||
if((it->getPowerOnHours() >= WORSE_HOURS) || (it->getPowerCycles() >= WORSE_POWERUP) || (it->getErrorCount() > 0))
|
||||
{
|
||||
|
@ -134,7 +134,7 @@ void TUI::updateTUI(list <Drive>* plistDrives, uint8_t u8SelectedEntry)
|
|||
break;
|
||||
}
|
||||
|
||||
WINDOW * tmp = createEntryWindow( ((int)(u16StdscrX/3) - 2), 5, 3, (5* (it - pvecDrives->begin()) )+3, sModelFamily, sModelName, sCapacity, sState, bSelectedEntry);
|
||||
WINDOW * tmp = createEntryWindow( ((int)(u16StdscrX/3) - 2), 5, 3, (5* (u8Index) )+3, sModelFamily, sModelName, sCapacity, sState, bSelectedEntry);
|
||||
wrefresh(tmp);
|
||||
u8Index++;
|
||||
}//end loop though drives
|
||||
|
@ -150,7 +150,7 @@ void TUI::updateTUI(list <Drive>* plistDrives, uint8_t u8SelectedEntry)
|
|||
menustate.bDelete = false;
|
||||
menustate.bShred = false;
|
||||
|
||||
menuview=createMenuView(((u16StdscrX)-(int)(u16StdscrX/3)-7), 10, (int)(u16StdscrX/3)+5,(u16StdscrY-11), menustate);
|
||||
menuview=createMenuView(((int)(u16StdscrX/3)-10 ), 10, (int)(u16StdscrX/3)+5,(u16StdscrY-11), menustate);
|
||||
wrefresh(menuview);
|
||||
|
||||
detailview=overwriteDetailViewWindow(((u16StdscrX)-(int)(u16StdscrX/3)-7), (u16StdscrY-15), (int)(u16StdscrX/3)+5);
|
||||
|
|
Loading…
Reference in New Issue