mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-24 16:47:32 +01:00
Remove some Mi2 testing code, only use Mild Alerts for Mi1 (fow now)
This commit is contained in:
parent
c2ff05e849
commit
9e32e7d0d3
@ -62,6 +62,7 @@ public class V1NotificationStrategy implements NotificationStrategy {
|
||||
* @param extraAction an extra action to be executed after every vibration and flash sequence. Allows to abort the repetition, for example.
|
||||
* @param builder
|
||||
*/
|
||||
@Override
|
||||
public void sendCustomNotification(VibrationProfile vibrationProfile, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
|
||||
BluetoothGattCharacteristic controlPoint = support.getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT);
|
||||
for (short i = 0; i < vibrationProfile.getRepeat(); i++) {
|
||||
|
@ -34,14 +34,8 @@ public class V2NotificationStrategy implements NotificationStrategy {
|
||||
int on = onOffSequence[j];
|
||||
on = Math.min(500, on); // longer than 500ms is not possible
|
||||
builder.write(alert, new byte[]{GattCharacteristic.MILD_ALERT}); //MILD_ALERT lights up GREEN leds, HIGH_ALERT lights up RED leds
|
||||
builder.wait(on);
|
||||
builder.write(alert, new byte[]{GattCharacteristic.HIGH_ALERT});
|
||||
builder.wait(on);
|
||||
builder.write(alert, new byte[]{0x3});
|
||||
builder.wait(on);
|
||||
builder.write(alert, new byte[]{0x4});
|
||||
builder.wait(on);
|
||||
builder.write(alert, new byte[]{0x5});
|
||||
// builder.wait(on);
|
||||
// builder.write(alert, new byte[]{GattCharacteristic.HIGH_ALERT});
|
||||
builder.wait(on);
|
||||
builder.write(alert, new byte[]{GattCharacteristic.NO_ALERT});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user