Skip to content

Commit

Permalink
Minor code tidy in Ember NCP (#858)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Jackson <[email protected]>
  • Loading branch information
cdjackson committed Nov 14, 2019
1 parent 0621d8a commit b932e2c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public ZigBeeStatus startup(boolean reinitialize) {
logger.debug("EZSP dongle initialize done - response {}", initResponse);
}

// print current security state to debug logs
// Print current security state to debug logs
ncp.getCurrentSecurityState();

scheduleNetworkStatePolling();
Expand Down Expand Up @@ -728,9 +728,7 @@ public void sendCommand(final int msgTag, final ZigBeeApsFrame apsFrame) {

transaction = new EzspSingleResponseTransaction(emberMulticast, EzspSendMulticastResponse.class);
} else {
logger.debug("EZSP message not sent: {}", apsFrame);
// ZigBeeGroupAddress groupAddress = (ZigBeeGroupAddress) zclCommand.getDestinationAddress();
// apsFrame.setGroupId(groupAddress.getGroupId());
logger.debug("EZSP message not sent as unknown address mode: {}", apsFrame);
return;
}

Expand Down Expand Up @@ -774,7 +772,7 @@ public void setZigBeeTransportReceive(ZigBeeTransportReceive zigbeeTransportRece
@Override
public void handlePacket(EzspFrame response) {
if (response.getFrameId() != POLL_FRAME_ID) {
logger.debug("RX EZSP: " + response.toString());
logger.debug("RX EZSP: {}", response);
}

if (response instanceof EzspIncomingMessageHandler) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ public void run() {

if (exceptionCnt++ > 10) {
logger.error("AshFrameHandler exception count exceeded");
// if (!close) {
// frameHandler.error(e);
closeHandler = true;
}
} catch (final Exception e) {
Expand Down Expand Up @@ -697,7 +695,7 @@ public EzspFrame call() {
// Remove the listener
removeTransactionListener(this);

return ezspTransaction.getResponse();// response;
return ezspTransaction.getResponse();
}

@Override
Expand All @@ -715,7 +713,6 @@ public boolean transactionEvent(EzspFrameResponse ezspResponse) {
}

transactionComplete();
// response = request;

return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,6 @@ private void removeTransactionListener(SpiListener listener) {
@Override
public Future<EzspFrame> sendEzspRequestAsync(final EzspTransaction ezspTransaction) {
class TransactionWaiter implements Callable<EzspFrame>, SpiListener {
// private EzspFrame response = null;
private boolean complete = false;

@Override
Expand Down Expand Up @@ -787,7 +786,7 @@ interface SpiListener {
}

/**
* Wait for the requested {@link EzspFrameResponse} to be received
* Wait for the requested {@link EzspFrameResponse} to be received.
*
* @param eventClass Request {@link EzspFrameResponse} to wait for
* @return response {@link Future} {@link EzspFrameResponse}
Expand Down

0 comments on commit b932e2c

Please sign in to comment.