Skip to content

Commit

Permalink
Fix minor bigs (#1426)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Jackson <[email protected]>
  • Loading branch information
cdjackson authored May 18, 2024
1 parent ed73445 commit ad93c94
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ private void sendNextFrame() {
logger.debug("TX XBEE Data:{}", builder.toString());

int[] outputBuffer = new int[data.size()];
for(int i = 0; i < data.size(); ++i) outputBuffer[i] = data.get(i);
for (int i = 0; i < data.size(); ++i) {
outputBuffer[i] = data.get(i);
}
serialPort.write(outputBuffer);

// Start the timeout
Expand Down Expand Up @@ -584,9 +586,9 @@ public XBeeResponse sendRequest(final XBeeCommand command) {
}

/**
* Sends a XBee request to the NCP without waiting for the response.
* Waits for a reponse of the requested class
*
* @param command Request {@link XBeeCommand} to send
* @param eventClass the class to wait for
* @return response {@link Future} {@link XBeeCommand}
*/
private Future<XBeeEvent> waitEventAsync(final Class<?> eventClass) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,6 @@ protected String deserializeAtCommand() {
return builder.toString();
}

/**
* Serializes a {@link ExtendedPanId}
*
* @param address the {@link ExtendedPanId}
*/
// protected void serializeExtendedPanId(ExtendedPanId epanId) {
// serializeUpperCaseString(epanId.toString());
// }

/**
* Deserializes a {@link ExtendedPanId}
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,8 @@ private boolean handleQueryNextImageCommand(QueryNextImageCommand command) {
|| command.getHardwareVersion() > otaFile.getMaximumHardware()) {
logger.debug(
"{} OTA Error: Request is inconsistent with hardware - requested={}, file min={}, file max={}",
command.getHardwareVersion(), otaFile.getMinimumHardware(), otaFile.getMaximumHardware());
cluster.getZigBeeAddress(), command.getHardwareVersion(), otaFile.getMinimumHardware(),
otaFile.getMaximumHardware());
sendNoImageAvailableResponse(command);
return true;
}
Expand All @@ -748,7 +749,8 @@ private boolean handleQueryNextImageCommand(QueryNextImageCommand command) {
// Some devices may make further requests for files once they have been updated
// By default, don't resend the existing file
if (!allowExistingFile && command.getFileVersion().equals(otaFile.getFileVersion())) {
logger.debug("{} OTA Error: Request is for existing file version {}", command.getFileVersion());
logger.debug("{} OTA Error: Request is for existing file version {}", cluster.getZigBeeAddress(),
command.getFileVersion());
sendNoImageAvailableResponse(command);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ public void nodeAdded(ZigBeeNode node) {
ZclAttribute attribute = keCluster
.getLocalAttribute(ZclKeyEstablishmentCluster.ATTR_SERVERKEYESTABLISHMENTSUITE);
if (attribute == null) {
logger.debug("{}: Unable to get ATTR_SERVERKEYESTABLISHMENTSUITE");
logger.debug("{}: Unable to get ATTR_SERVERKEYESTABLISHMENTSUITE", node.getIeeeAddress());
} else {
attribute.setValue(1);
attribute.setImplemented(true);
Expand Down

0 comments on commit ad93c94

Please sign in to comment.