Vibratissimo: clear queue when setting vibration
This commit is contained in:
parent
6a18d90fee
commit
1f8cfa5a68
|
@ -44,7 +44,9 @@ public class VibrationActivity extends GBActivity {
|
|||
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
LOG.info("changed to:" + progress);
|
||||
if (progress > 0) { // 1-16
|
||||
progress = progress * 16 - 1; // max 255
|
||||
}
|
||||
GBApplication.deviceService().onSetConstantVibration(progress);
|
||||
}
|
||||
|
||||
|
|
|
@ -215,6 +215,7 @@ public class VibratissimoSupport extends AbstractBTLEDeviceSupport {
|
|||
|
||||
@Override
|
||||
public void onSetConstantVibration(int intensity) {
|
||||
getQueue().clear();
|
||||
BluetoothGattCharacteristic characteristic2 = getCharacteristic(UUID.fromString("00001526-1212-efde-1523-785feabcd123"));
|
||||
BluetoothGattCharacteristic characteristic1 = getCharacteristic(UUID.fromString("00001524-1212-efde-1523-785feabcd123"));
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<SeekBar
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/vibration_seekbar"
|
||||
android:max="256"
|
||||
android:max="16"
|
||||
android:scaleY="4.0"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue