Add debug
This commit is contained in:
parent
d5f6651620
commit
4236ccdb06
1 changed files with 9 additions and 4 deletions
|
@ -109,7 +109,7 @@ class NxdtUsbAbi1 {
|
|||
while (true){
|
||||
directive = readUsbDirective();
|
||||
|
||||
RainbowHexDump.hexDumpUTF8(directive);
|
||||
//RainbowHexDump.hexDumpUTF8(directive);
|
||||
|
||||
if (isInvalidDirective(directive))
|
||||
continue;
|
||||
|
@ -190,7 +190,7 @@ class NxdtUsbAbi1 {
|
|||
return;
|
||||
}
|
||||
|
||||
logPrinter.print("Write request for: '"+filename+"' ("+fileSize+" bytes)", EMsgType.INFO);
|
||||
logPrinter.print("Receiving: '"+filename+"' ("+fileSize+" b)", EMsgType.INFO);
|
||||
// If RomFs related
|
||||
if (isRomFs(filename)) {
|
||||
if (isWindows)
|
||||
|
@ -264,15 +264,20 @@ class NxdtUsbAbi1 {
|
|||
long received = 0;
|
||||
int bufferSize;
|
||||
|
||||
System.out.println("|"+file.getAbsolutePath()+"|");
|
||||
System.out.println(String.format("R: %10d / S: %10d", received, size));
|
||||
|
||||
while (received < size){
|
||||
readBuffer = readUsbFile();
|
||||
System.out.println("Size: "+readBuffer.length);
|
||||
bos.write(readBuffer);
|
||||
System.out.println("Write OK");
|
||||
bufferSize = readBuffer.length;
|
||||
received += bufferSize;
|
||||
|
||||
System.out.println("calculations done");
|
||||
logPrinter.updateProgress((received + bufferSize) / (size / 100.0) / 100.0);
|
||||
}
|
||||
|
||||
System.out.println("Done "+file.getName());
|
||||
logPrinter.updateProgress(1.0);
|
||||
bos.close();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue