Skip to content

Commit

Permalink
Max! Cube Fix Send command error
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Verpaalen <[email protected]>
  • Loading branch information
marcelrv committed Nov 22, 2014
1 parent 6fba8ad commit 5b7f59d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,13 @@ private synchronized void startAutomaticRefresh() {
* initiates send commands to the maxCube bridge
*/
private synchronized void sendCommands() {
if (bridge !=null)
bridge.sendCommands();
}
if (bridge==null) initializeBridge() ;
try {
if (bridge !=null) bridge.sendCommands();
} catch(Exception e) {
logger.debug("Exception occurred during execution: {}", e.getMessage(), e);
}
}
/**
* initiates read data from the maxCube bridge
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public final class C_Message extends Message {

public C_Message(String raw) {
super(raw);
logger.debug(" *** C-Message ***");
String[] tokens = this.getPayload().split(Message.DELIMETER);

rfAddress = tokens[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public abstract class Device {
public Device(DeviceConfiguration c) {
this.serialNumber = c.getSerialNumber();
this.rfAddress = c.getRFAddress();
this.roomId= c.getRoomId();
this.config = c;
}

Expand Down

0 comments on commit 5b7f59d

Please sign in to comment.