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){
|
while (true){
|
||||||
directive = readUsbDirective();
|
directive = readUsbDirective();
|
||||||
|
|
||||||
RainbowHexDump.hexDumpUTF8(directive);
|
//RainbowHexDump.hexDumpUTF8(directive);
|
||||||
|
|
||||||
if (isInvalidDirective(directive))
|
if (isInvalidDirective(directive))
|
||||||
continue;
|
continue;
|
||||||
|
@ -190,7 +190,7 @@ class NxdtUsbAbi1 {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
logPrinter.print("Write request for: '"+filename+"' ("+fileSize+" bytes)", EMsgType.INFO);
|
logPrinter.print("Receiving: '"+filename+"' ("+fileSize+" b)", EMsgType.INFO);
|
||||||
// If RomFs related
|
// If RomFs related
|
||||||
if (isRomFs(filename)) {
|
if (isRomFs(filename)) {
|
||||||
if (isWindows)
|
if (isWindows)
|
||||||
|
@ -264,15 +264,20 @@ class NxdtUsbAbi1 {
|
||||||
long received = 0;
|
long received = 0;
|
||||||
int bufferSize;
|
int bufferSize;
|
||||||
|
|
||||||
|
System.out.println("|"+file.getAbsolutePath()+"|");
|
||||||
|
System.out.println(String.format("R: %10d / S: %10d", received, size));
|
||||||
|
|
||||||
while (received < size){
|
while (received < size){
|
||||||
readBuffer = readUsbFile();
|
readBuffer = readUsbFile();
|
||||||
|
System.out.println("Size: "+readBuffer.length);
|
||||||
bos.write(readBuffer);
|
bos.write(readBuffer);
|
||||||
|
System.out.println("Write OK");
|
||||||
bufferSize = readBuffer.length;
|
bufferSize = readBuffer.length;
|
||||||
received += bufferSize;
|
received += bufferSize;
|
||||||
|
System.out.println("calculations done");
|
||||||
logPrinter.updateProgress((received + bufferSize) / (size / 100.0) / 100.0);
|
logPrinter.updateProgress((received + bufferSize) / (size / 100.0) / 100.0);
|
||||||
}
|
}
|
||||||
|
System.out.println("Done "+file.getName());
|
||||||
logPrinter.updateProgress(1.0);
|
logPrinter.updateProgress(1.0);
|
||||||
bos.close();
|
bos.close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue