use of com.eveningoutpost.dexdrip.watch.miband.message.AlertLevelMessage in project xDrip-plus by jamorham.
the class MiBandService method vibrateAlert.
private void vibrateAlert(AlertLevelMessage.AlertLevelType level) {
if (level == AlertLevelMessage.AlertLevelType.NoAlert) {
new QueueMe().setBytes(COMMAND_DISABLE_CALL).setDescription("Send specific disable command for" + level).setQueueWriteCharacterstic(Const.UUID_CHARACTERISTIC_CHUNKEDTRANSFER).expireInSeconds(QUEUE_EXPIRED_TIME).setDelayMs(QUEUE_DELAY).queue();
}
AlertLevelMessage message = new AlertLevelMessage();
new QueueMe().setBytes(message.getAlertLevelMessage(level)).setDescription("Send vibrateAlert: " + level).setQueueWriteCharacterstic(message.getCharacteristicUUID()).expireInSeconds(QUEUE_EXPIRED_TIME).setDelayMs(QUEUE_DELAY).queue();
}
use of com.eveningoutpost.dexdrip.watch.miband.message.AlertLevelMessage in project xDrip by NightscoutFoundation.
the class MiBandService method vibrateAlert.
private void vibrateAlert(AlertLevelMessage.AlertLevelType level) {
if (level == AlertLevelMessage.AlertLevelType.NoAlert) {
new QueueMe().setBytes(COMMAND_DISABLE_CALL).setDescription("Send specific disable command for" + level).setQueueWriteCharacterstic(Const.UUID_CHARACTERISTIC_CHUNKEDTRANSFER).expireInSeconds(QUEUE_EXPIRED_TIME).setDelayMs(QUEUE_DELAY).queue();
}
AlertLevelMessage message = new AlertLevelMessage();
new QueueMe().setBytes(message.getAlertLevelMessage(level)).setDescription("Send vibrateAlert: " + level).setQueueWriteCharacterstic(message.getCharacteristicUUID()).expireInSeconds(QUEUE_EXPIRED_TIME).setDelayMs(QUEUE_DELAY).queue();
}
use of com.eveningoutpost.dexdrip.watch.miband.message.AlertLevelMessage in project xDrip by NightscoutFoundation.
the class MiBandService method periodicVibrateAlert.
private void periodicVibrateAlert(int count, int activeVibrationTime, int pauseVibrationTime) {
AlertLevelMessage message = new AlertLevelMessage();
new QueueMe().setBytes(message.getPeriodicVibrationMessage((byte) count, (short) activeVibrationTime, (short) pauseVibrationTime)).setDescription(String.format("Send periodicVibrateAlert c:%d a:%d p:%d", count, activeVibrationTime, pauseVibrationTime)).setQueueWriteCharacterstic(message.getCharacteristicUUID()).expireInSeconds(QUEUE_EXPIRED_TIME).setDelayMs((activeVibrationTime + pauseVibrationTime) * count).queue();
}
use of com.eveningoutpost.dexdrip.watch.miband.message.AlertLevelMessage in project xDrip-plus by jamorham.
the class MiBandService method periodicVibrateAlert.
private void periodicVibrateAlert(int count, int activeVibrationTime, int pauseVibrationTime) {
AlertLevelMessage message = new AlertLevelMessage();
new QueueMe().setBytes(message.getPeriodicVibrationMessage((byte) count, (short) activeVibrationTime, (short) pauseVibrationTime)).setDescription(String.format("Send periodicVibrateAlert c:%d a:%d p:%d", count, activeVibrationTime, pauseVibrationTime)).setQueueWriteCharacterstic(message.getCharacteristicUUID()).expireInSeconds(QUEUE_EXPIRED_TIME).setDelayMs((activeVibrationTime + pauseVibrationTime) * count).queue();
}
Aggregations