Closed ejalaa12 closed 2 years ago
@ejalaa12 thx for helping improve parameter support. Your efforts have been most appreciated.
OT - may I ask how you are using rclnodejs? Also please open an issue if you have suggestions for improving the use of rclnodejs including the onboarding experience.
@wayneparrott you're welcome. It's a great job you guys are doing already.
We're using rclnodejs as a backend to the HMI that controls our ros2 robot and some other products.
We'll be sure to drop new PR/Issue when needed :)
Thanks for the merge !
Public API Changes None
Description
This PR fixes the following issues with parameters when the parameter type is an array. (in order of commits)
PARAMETER_STRING_ARRAY
was not handled everywherePARAMETER_[BYTE/INTEGER/DOUBLE]_ARRAY
are of typeTypedArray
which throws aTypeError('incompatible value')
in thevalidate()
method. This is because_validArray()
(more specificallyArray.isArray()
returnsfalse
when given aTypedArray
arrayElementType
ofPARAMETER_BYTE_ARRAY
was set toPARAMETER_BYTE
which is a type that does not exist (undefined
). We can usePARAMETER_INTEGER
instead.Unit tests were added to reproduce the bugs, then the next commits fix those bugs.