-
Notifications
You must be signed in to change notification settings - Fork 35
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 scalar input forms #141
Conversation
Glancing over this, am I understanding correctly that this resolves nasa/fprime#2273 ? Or is that a separate case? |
I didn't see that issue but yes, this pull request resolved exactly that problem. |
This PR resolves an issue I'm seeing with multi-element parameters. Not a case noted in either this PR or the linked issue nasa/fprime#2273.
|
For testing my change you could: clone my branch |
The previous solution was working but created a new bug, I implemented a new solution that solve the original problem without impacting unsigned integer input. |
@SMorettini I went ahead and edited this to use full type names to ensure that the code does not inadvertently read types starting with letters. Care to review my one commit? @thomas-bc care to review? |
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.
Awesome change! I touched it up to ensure a previous bug we've seen has not resurfaced.
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.
Thank you for the change, I didn't have time to make it in the last weeks.
I cannot approve it because I created the pull request, anyway, I agree with your changes.
Since I did not see booleans addressed in these if trees, which caused errors, I also fixed: nasa/fprime#2320 |
Change Description
Original change: Added the modifier
number
to the scalar argument. This will cast the value to a number and not return a string.((https://v2.vuejs.org/v2/guide/forms.html#number)) --> This change was breaking the usage of hex, bin and octal because there is not such representation in Javascript.The new change consists of updating the squash function so any number is actually converted to a number.
Rationale
This fix is required to have commands containing argument arrays of numbers. Without the Fix, Vue will send to the GDS server an array like
'["1", "2",...]'
. The parsing of the array will fail in Python with the error "Failed to validate all arguments".After the fix, the array will be sent to the GDS backend as '[1, 2,...]' and the parsing of the array will work fine.