Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/deviation/DeviationUploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ private static void readBinFromDevice(DfuDevice dev, String fname, int address,
private static void listDevices(List <DfuDevice> devs)
{
if (devs.size() == 0) {
LOG.info("No devices found.");
LOG.finer("No devices found.");
} else {
LOG.info(String.format("Device\t%9s %8s %8s %7s %s", "Interface", "Start", "End", "Size", "Count"));
for (DfuDevice dev: devs) {
int i = 0;
LOG.info(String.format("%s", dev.getTxInfo().type().getName()));
LOG.finer(String.format("%s", dev.getTxInfo().type().getName()));
for (DfuInterface iface: dev.Interfaces()) {
for (SegmentParser segment: iface.Memory().segments()) {
for (Sector sector: segment.sectors()) {
Expand Down
10 changes: 5 additions & 5 deletions src/deviation/Dfu.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static int dfuseSpecialCommand(DfuDevice dev, long address, int command)
address & ~(sector.size() - 1)));
buf[0] = 0x41; // Erase command
} else if (command == DFUSE_SET_ADDRESS) {
LOG.info(String.format("Setting address pointer to 0x%x", address));
LOG.fine(String.format("Setting address pointer to 0x%x", address));
buf[0] = 0x21; /* Set Address Pointer command */
} else {
LOG.severe(String.format("Error: Non-supported special command %d", command));
Expand Down Expand Up @@ -313,7 +313,7 @@ public static int setIdle(DfuDevice dev)
LOG.severe("Device still in Runtime Mode!");
return -1;
case DfuStatus.STATE_DFU_ERROR:
LOG.fine("dfuERROR, clearing status");
LOG.info("dfuERROR, clearing status");
if (clearStatus(dev) < 0) {
LOG.severe("error clear_status");
return -1;
Expand Down Expand Up @@ -358,7 +358,7 @@ public static int setIdle(DfuDevice dev)
/* Boot loader decides the start address, unknown to us */
/* Use a short length to lower risk of running out of bounds */

LOG.fine(String.format("bytes_per_hash=%d", xfer_size));
LOG.finer(String.format("bytes_per_hash=%d", xfer_size));
LOG.info("Starting device read");

ByteArrayOutputStream data = new ByteArrayOutputStream();
Expand Down Expand Up @@ -393,7 +393,7 @@ public static int sendToDevice(DfuDevice dev, long address, byte[] data, Progre
setIdle(dev);
while (true) {
Sector sector = dev.Memory().find(sector_address);
LOG.info(String.format("%d: %d (%d)", sector_address, sector == null ? -1 : sector.end(), address + data.length));
LOG.fine(String.format("%d: %d (%d)", sector_address, sector == null ? -1 : sector.end(), address + data.length));
if (sector == null || ! sector.writable()) {
LOG.severe(String.format("Error: No sector found that can be written at address 0x%08x", sector_address));
return -1;
Expand Down Expand Up @@ -497,7 +497,7 @@ public static int resetSTM32(DfuDevice dev) {
if( status.bState != DfuStatus.STATE_DFU_MANIFEST) {
LOG.severe("Error: Expected STM32 to be in dfuMANIFEST state after get-status command!");
} else {
LOG.info("Successfully reset STM32");
LOG.fine("Successfully reset STM32");
}
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/deviation/TxInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public TxInfo(byte [] data)
int j;
for (j = 0; j < 32 && data[j] != 0; j++) { }
model = new String(Arrays.copyOfRange(data, 0, j));
LOG.info(model);
LOG.fine(model);
type = TransmitterList.UNKNOWN();
txloop:
for (Transmitter tx : TransmitterList.values()) {
Expand Down
2 changes: 1 addition & 1 deletion src/deviation/filesystem/FlashIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void close() throws IOException {
}
}
}
public void flush() { LOG.info("flush");}
public void flush() { LOG.finer("flush");}
public int getSectorSize() throws IOException { return fsSectorSize; }
public long getSize() throws IOException { return ram.length - startOffset; }
public boolean isClosed() { return false; }
Expand Down
6 changes: 3 additions & 3 deletions src/deviation/filesystem/TxInterfaceCommon.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ protected static List<FileInfo> readDirRecur(String parent, FsDirectory dir) thr
if (entry.isDirectory()) {
if (entry.getName().equals(".") || entry.getName().equals(".."))
continue;
LOG.fine(String.format("DIR: %s", entry.getName()));
LOG.finer(String.format("DIR: %s", entry.getName()));
files.addAll(readDirRecur(parent + entry.getName() + "/", entry.getDirectory()));
} else {
files.add(new FileInfo(parent + entry.getName(), (int)entry.getFile().getLength()));
LOG.fine(String.format("FILE: %s (%d)", entry.getName(), entry.getFile().getLength()));
LOG.finer(String.format("FILE: %s (%d)", entry.getName(), entry.getFile().getLength()));
}
}
return files;
Expand All @@ -45,7 +45,7 @@ protected void readDir(FileSystem fs, String dirStr) {
Iterator<FsDirectoryEntry> itr = dir.iterator();
while(itr.hasNext()) {
FsDirectoryEntry entry = itr.next();
LOG.info(entry.getName());
LOG.finest(entry.getName());
}
} catch (IOException e) { e.printStackTrace(); }
}
Expand Down
4 changes: 2 additions & 2 deletions src/deviation/gui/MonitorUSB.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public String doInBackground() {
if (dfuDev != null) {
LibUsb.freeDeviceList(this.devices, true);
dfuDev = null;
LOG.info("Unplug detected");
LOG.finest("Unplug detected");
state_changed = true;
//Signal disconnect
}
Expand All @@ -71,7 +71,7 @@ public String doInBackground() {
dfuDev = dev;
dfuDev.setTxInfo(TxInfo.getTxInfo(dfuDev));
this.devices = devices;
LOG.info("Hotplug detected");
LOG.finest("Hotplug detected");
state_changed = true;
//Signal connect/change
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/deviation/gui/TextEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public TextEditor(FileInfo file) {
textArea.setMarkOccurrences(true);
textArea.append(finalData);
Font f = textArea.getFont();
LOG.info(String.format("Font: %d", f.getSize()));
LOG.finest(String.format("Font: %d", f.getSize()));
f = new Font(f.getFamily(), f.getStyle(), f.getSize()+5);
textArea.setFont(f);
RTextScrollPane sp = new RTextScrollPane(textArea);
Expand Down