cleanup
This commit is contained in:
parent
50ee753667
commit
65a2237348
|
@ -5,6 +5,6 @@ public interface IRelaisboard {
|
|||
void toggleRelais(final int relais, final int milliseconds);
|
||||
void blinkRelais(final int relais, final int pause);
|
||||
void blinkRelaisStop(final int relais);
|
||||
boolean open();
|
||||
void open();
|
||||
void close();
|
||||
}
|
||||
|
|
|
@ -45,13 +45,13 @@ public class Relaisboard implements IRelaisboard {
|
|||
|
||||
|
||||
@Override
|
||||
public boolean open() {
|
||||
public void open() {
|
||||
serialPortGeoeffnet = false;
|
||||
Boolean foundPort = false;
|
||||
|
||||
if (serialPortGeoeffnet) {
|
||||
Logger.sLog("Serialport bereits geöffnet");
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
Enumeration enumComm = CommPortIdentifier.getPortIdentifiers();
|
||||
|
@ -66,7 +66,7 @@ public class Relaisboard implements IRelaisboard {
|
|||
}
|
||||
if (!foundPort) {
|
||||
Logger.sLog("Serialport nicht gefunden: " + portName);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -77,8 +77,6 @@ public class Relaisboard implements IRelaisboard {
|
|||
|
||||
outputStream = serialPort.getOutputStream();
|
||||
serialPortGeoeffnet = true;
|
||||
|
||||
return true;
|
||||
} catch (PortInUseException e) {
|
||||
Logger.sLog("Relaisboard error: Port belegt " + portName);
|
||||
} catch (IOException e) {
|
||||
|
@ -86,8 +84,6 @@ public class Relaisboard implements IRelaisboard {
|
|||
} catch(UnsupportedCommOperationException e) {
|
||||
Logger.sLog("Relaisboard error: Konnte Schnittstellen-Paramter nicht setzen");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue