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

Use a map for register definitions #6

Open
tvannoy opened this issue Sep 30, 2019 · 0 comments · Fixed by #89
Open

Use a map for register definitions #6

tvannoy opened this issue Sep 30, 2019 · 0 comments · Fixed by #89
Labels
enhancement New feature or request

Comments

@tvannoy
Copy link
Member

tvannoy commented Sep 30, 2019

Currently, register definition code looks like

mp.register(2).name       = 'rate';
mp.register(2).value      = 1;          
mp.register(2).min        = 0.1;          
mp.register(2).max        = 5;          
mp.register(2).default    = 50;          

which is fine. However, referencing these register settings in the simulink model might be easier if we use a map instead:

mp.register('rate').value = 1;
mp.register('rate').min = 0.1;

In conjunction with #4, this would make using the register data types in the model easier, especially when manually setting output data types of arithmetic blocks.

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

Successfully merging a pull request may close this issue.

1 participant