This change reworks the conversion from VibrateCmd to ScalarCmd by building a map of indexes of vibrate features on a devices that supports ScalarCmd so that devices that have non-vibrators before or embedded between vibrators don't try to send vibrate commands to the those features.
VibrateCmd( 0, [1.0, 0.5] ) for a device with ScalarCmd(Vibrate, Rotate, Vibrate) now generates ScalarCmd( 0, [ {0, 1.0, Vibrate}, {2, 0.5, Vibrate}] ) vs previously just copying the feature index, which would have produced the invalid: ScalarCmd( 0, [ {0, 1.0, Vibrate}, {1, 0.5, Vibrate}] )
This change reworks the conversion from VibrateCmd to ScalarCmd by building a map of indexes of vibrate features on a devices that supports ScalarCmd so that devices that have non-vibrators before or embedded between vibrators don't try to send vibrate commands to the those features.
VibrateCmd( 0, [1.0, 0.5] )
for a device withScalarCmd(Vibrate, Rotate, Vibrate)
now generatesScalarCmd( 0, [ {0, 1.0, Vibrate}, {2, 0.5, Vibrate}] )
vs previously just copying the feature index, which would have produced the invalid:ScalarCmd( 0, [ {0, 1.0, Vibrate}, {1, 0.5, Vibrate}] )