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

[FEATURE REQUEST] Add feature that prevents overwriting register instance in device #89

Open
sonelu opened this issue Jun 24, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sonelu
Copy link
Owner

sonelu commented Jun 24, 2020

Is your feature request related to a problem? Please describe.
Device classes contain attributes for each of the register defined in the device definition file. When setting the values in the registers the approach is:

device.register.value = value

If by mistake the developer uses:

device.register = value

the whole register object referred to by the device.register is replaced with the number rendering that register functionality null.

Describe the solution you'd like
It would be nice to have either an error message that will prohibit that or a method to handle the above assignment as an assignment to the value property of the register.

Describe alternatives you've considered
We can leave the code as it is as the framework uses correctly the value property, but this might be a little hard for the new developers using the framework.

Additional context
Add any other context or screenshots about the feature request here.

@sonelu sonelu added the enhancement New feature or request label Jun 24, 2020
@sonelu sonelu added this to the Release 0.2 milestone Jun 24, 2020
@sonelu sonelu self-assigned this Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant