Closed WesleyAC closed 3 years ago
Annnnnnnnd this is why I need to finish implementing test devices for the FFI so we can start getting unit tests in. :|
Thanks for the report! I'll see about getting this fixed up, just need to add an extra check.
Fixed and tested in 1.0.13
Calling
device.vibrate([1.0, 1.0])
results in the error:The actual behaviour is that
vibrate
can take a number or an array ofVibrationCmd
s. So as not to make breaking changes, it's probably best to changevibrate
to take either a number, array of numbers, or array ofVibrationCmd
s. Alternatively, the error could be changed to be accurate to the behavior, but taking an array of numbers seems convenient enough to include, and is the documented behaviour elsewhere.relevant code