changed progress percentage calculation
This commit is contained in:
@ -23,14 +23,14 @@
|
||||
#define SOFTWARE_VERSION "alpha"
|
||||
#define HARDWARE_VERSION "generic"
|
||||
|
||||
#define LOG_LEVEL_HIGH //log everything, like drive scann thread
|
||||
//#define LOG_LEVEL_HIGH //log everything, like drive scann thread
|
||||
#ifndef LOG_LEVEL_HIGH
|
||||
#define LOG_LEVEL_LOW //log only user actions and tasks
|
||||
#endif
|
||||
|
||||
// Logic
|
||||
//#define DRYRUN //don´t touch the drives
|
||||
#define DEMO_DRIVE_SIZE 1024*1024*256 // 256MB used for shredding only
|
||||
//#define DEMO_DRIVE_SIZE 1024*1024*256 // 256MB used for shredding only
|
||||
#define FROZEN_ALERT //show alert if drive is frozen
|
||||
#define ZERO_CHECK_ALERT //check drive after shred if all bytes are zero, show alert if this fails
|
||||
|
||||
|
@ -40,13 +40,14 @@ private:
|
||||
fileDescriptor driveFileDiscr;
|
||||
unsigned char caChunk[CHUNK_SIZE];
|
||||
unsigned long ulDriveByteSize;
|
||||
unsigned long ulDriveByteOverallCount = 0; //all bytes shredded in all iterations + checking -> used for progress calculation
|
||||
double d32Percent = 0.0;
|
||||
double d32TmpPercent = 0.0;
|
||||
|
||||
inline double calcProgress(unsigned long ulDriveByteIndex, unsigned int uiIteration);
|
||||
inline double calcProgress();
|
||||
int iRewindDrive(fileDescriptor file);
|
||||
unsigned long getDriveSizeInBytes(fileDescriptor file);
|
||||
unsigned int uiCalcChecksum(fileDescriptor file);
|
||||
unsigned int uiCalcChecksum(fileDescriptor file, Drive* drive, int* ipSignalFd);
|
||||
void cleanup();
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user