nicer logging
This commit is contained in:
parent
236bf8c143
commit
cc8507b4b4
|
@ -62,7 +62,7 @@ public class IoHelper {
|
|||
/**
|
||||
* @return true if packet has the expected response code
|
||||
*/
|
||||
static boolean checkResponseCode(byte[] response, byte code) {
|
||||
public static boolean checkResponseCode(byte[] response, byte code) {
|
||||
return response != null && response.length > 0 && response[0] == code;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,9 +61,9 @@ public class SerialIoStreamJSSC implements IoStream {
|
|||
public void close() {
|
||||
isClosed = true;
|
||||
try {
|
||||
FileLog.MAIN.logLine("CLOSING PORT...");
|
||||
FileLog.MAIN.logLine("CLOSING PORT... " + serialPort.getPortName());
|
||||
serialPort.closePort();
|
||||
FileLog.MAIN.logLine("PORT CLOSED");
|
||||
FileLog.MAIN.logLine("PORT CLOSED: " + serialPort.getPortName());
|
||||
} catch (SerialPortException e) {
|
||||
logger.error("Error closing port: " + e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue