Remove some Mi2 testing code, only use Mild Alerts for Mi1 (fow now)

master
cpfeiffer 2016-10-08 22:43:41 +02:00
parent c2ff05e849
commit 9e32e7d0d3
2 changed files with 3 additions and 8 deletions

View File

@ -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++) {

View File

@ -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});