-
Notifications
You must be signed in to change notification settings - Fork 16
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 getDirectory for parameters #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello!
Thank you for contributing to the Sofie Project! I have taken an initial look at this PR and have some questions left. Hopefully you'll be able to help me with them so we can get this merged.
} | ||
|
||
// this resulted in doubled subscription because getDirectory() adds the element as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what's going on here. Since the callback is never passed to the getDirectory call it should not cause a double subscription.
cb, | ||
}) | ||
if (tree) { | ||
const req = await this.getDirectory(tree) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constant is never used so it is not necessary to assign it
const req = await this.getDirectory(tree) | ||
tree = (await req.response) as NumberedTreeNode<EmberElement> | ||
tree = getNextChild(tree, i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help me understand why this is needed in regards to the main issue this PR addresses?
The reason I am asking it makes it such that every time a library user uses this call the library will fetch all nodes in the path even though we have already fetched these before and can just look at them locally.
Closing as this is superseded by #40 |
About the Contributor
This pull request is posted on behalf of NEP Germany.
Type of Contribution
This is a: Bug fix
Current Behavior
In current releases of Lawo MC square devices you need to explicitly send a "Get Directory" request down to the parameter in order to get updates from the device. This is not the case. The "getElementByPath()" request currently only requests until the parent of the specified node.
New Behavior
"getElementByPath()" now explicitly requests the whole specified path. This fixes the problem, that sometimes no update is received from specific parameters
Status
[ x ] PR is ready to be reviewed.
[ x ] The functionality has been tested by the author.
[ x ] Relevant unit tests has been added / updated.
[ x ] Relevant documentation (code comments, system documentation) has been added / updated.