Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect call to RemoveFailedNode #1150

Merged
merged 1 commit into from Mar 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -684,8 +684,7 @@ public Collection<ZWaveNode> getNodes() {
* Transmits the {@link ZWaveCommandClassTransactionPayload} to a Node.
* This will not wait for the transaction response.
*
* @param transaction
* the {@link ZWaveCommandClassTransactionPayload} message to send.
* @param transaction the {@link ZWaveCommandClassTransactionPayload} message to send.
*/
public void sendData(ZWaveCommandClassTransactionPayload transaction) {
if (controller == null) {
Expand Down Expand Up @@ -742,7 +741,7 @@ public void replaceFailedNode(int nodeId) {
if (controller == null) {
return;
}
controller.requestRemoveFailedNode(nodeId);
controller.requestSetFailedNode(nodeId);
}

public void reinitialiseNode(int nodeId) {
Expand Down
Expand Up @@ -1001,10 +1001,10 @@ public void handleConfigurationUpdate(Map<String, Object> configurationParameter
case "action":
if ("failed".equals(cfg[1]) && valueObject instanceof Boolean && ((Boolean) valueObject) == true) {
controllerHandler.replaceFailedNode(nodeId);
controllerHandler.checkNodeFailed(nodeId);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right, but the terminology is a bit confusing...

The method name replaceFailedNode is confusing, because it sends the SetFailedNode request. I suspect this ties back to the zwave terminology, but it's confusing nonetheless.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree, but as you rightly assume, I tried to stick to the ZWave terminology (and is probably why I cocked it up in the first place).

}
if ("remove".equals(cfg[1]) && valueObject instanceof Boolean && ((Boolean) valueObject) == true) {
controllerHandler.removeFailedNode(nodeId);
controllerHandler.checkNodeFailed(nodeId);
}
if ("reinit".equals(cfg[1]) && valueObject instanceof Boolean && ((Boolean) valueObject) == true) {
logger.debug("NODE {}: Re-initialising node!", nodeId);
Expand Down