-
Notifications
You must be signed in to change notification settings - Fork 188
Add Active Dev to Timing Class #767
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
01a714d
Add active_dev to Timing class
charitylxy 6039446
update changelog
charitylxy e977ddb
Update codegen template
charitylxy 7dd920f
fix lint error
charitylxy 0af57db
update metadata
charitylxy 0af2634
Update codegen
charitylxy 0f832ea
fix error
charitylxy 343c137
remove ACTIVE_DEVS_SUPPORTED_ATTRIBUTES
charitylxy 6d1ceaf
raise errors for active devs not supported timing attribute
charitylxy 845faa9
address comments
charitylxy f87508b
add unit test
charitylxy 61bee66
remove unused variable
charitylxy 308a8d1
add more test
charitylxy 6566ae5
address comments
charitylxy a07ccd6
address comment
charitylxy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,31 @@ | ||
| <%def name="script_property_deleter(attribute)">\ | ||
| <% | ||
| from codegen.utilities.attribute_helpers import get_generic_attribute_function_name | ||
| from codegen.utilities.attribute_helpers import get_generic_attribute_function_name, ACTIVE_DEVS_SUPPORTED_ATTRIBUTES | ||
| %>\ | ||
| @${attribute.name}.deleter | ||
| def ${attribute.name}(self): | ||
| \ | ||
| ## Script interpreter call. | ||
| <% | ||
| generic_attribute_func = get_generic_attribute_function_name(attribute) | ||
| if attribute.name in ACTIVE_DEVS_SUPPORTED_ATTRIBUTES: | ||
| generic_attribute_func_ex = get_generic_attribute_function_name(attribute) + "_ex" | ||
| function_call_args = [] | ||
| for handle_parameter in attribute.handle_parameters: | ||
| function_call_args.append(handle_parameter.accessor) | ||
| if attribute.python_class_name == "Watchdog": | ||
| function_call_args.append("\"\"") | ||
| function_call_args.append(hex(attribute.id)) | ||
| if attribute.name in ACTIVE_DEVS_SUPPORTED_ATTRIBUTES: | ||
| function_call_args_ex = function_call_args.copy() | ||
| function_call_args_ex.insert(1, "self._active_devs") | ||
| %>\ | ||
| %if attribute.name in ACTIVE_DEVS_SUPPORTED_ATTRIBUTES: | ||
| if self._active_devs: | ||
| self._interpreter.reset_${generic_attribute_func_ex}(${', '.join(function_call_args_ex)}) | ||
| else: | ||
| self._interpreter.reset_${generic_attribute_func}(${', '.join(function_call_args)}) | ||
| %else: | ||
| self._interpreter.reset_${generic_attribute_func}(${', '.join(function_call_args)}) | ||
| %endif | ||
| </%def> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.