Search in sources :

Example 6 with BluetoothBytesParser

use of com.welie.blessed.BluetoothBytesParser in project openScale by oliexdev.

the class BluetoothBeurerBF105 method requestVendorSpecificUserList.

@Override
protected synchronized void requestVendorSpecificUserList() {
    BluetoothBytesParser parser = new BluetoothBytesParser();
    parser.setIntValue(0, FORMAT_UINT8);
    writeBytes(SERVICE_BF105_CUSTOM, CHARACTERISTIC_USER_LIST, parser.getValue());
}
Also used : BluetoothBytesParser(com.welie.blessed.BluetoothBytesParser)

Example 7 with BluetoothBytesParser

use of com.welie.blessed.BluetoothBytesParser in project openScale by oliexdev.

the class BluetoothBeurerBF105 method requestMeasurement.

@Override
protected synchronized void requestMeasurement() {
    BluetoothBytesParser parser = new BluetoothBytesParser();
    parser.setIntValue(0, FORMAT_UINT8);
    writeBytes(SERVICE_BF105_CUSTOM, CHARACTERISTIC_TAKE_MEASUREMENT, parser.getValue());
}
Also used : BluetoothBytesParser(com.welie.blessed.BluetoothBytesParser)

Example 8 with BluetoothBytesParser

use of com.welie.blessed.BluetoothBytesParser in project openScale by oliexdev.

the class BluetoothBeurerBF105 method writeTargetWeight.

protected void writeTargetWeight() {
    BluetoothBytesParser parser = new BluetoothBytesParser();
    int targetWeight = (int) this.selectedUser.getGoalWeight();
    parser.setIntValue(targetWeight, FORMAT_UINT16);
    writeBytes(SERVICE_BF105_CUSTOM, CHARACTERISTIC_TARGET_WEIGHT, parser.getValue());
}
Also used : BluetoothBytesParser(com.welie.blessed.BluetoothBytesParser)

Example 9 with BluetoothBytesParser

use of com.welie.blessed.BluetoothBytesParser in project openScale by oliexdev.

the class BluetoothBeurerBF105 method writeInitials.

@Override
protected void writeInitials() {
    BluetoothBytesParser parser = new BluetoothBytesParser();
    String initials = getInitials(this.selectedUser.getUserName());
    Timber.d("Initials: " + initials);
    parser.setString(initials);
    writeBytes(SERVICE_BF105_CUSTOM, CHARACTERISTIC_INITIALS, parser.getValue());
}
Also used : BluetoothBytesParser(com.welie.blessed.BluetoothBytesParser)

Example 10 with BluetoothBytesParser

use of com.welie.blessed.BluetoothBytesParser in project openScale by oliexdev.

the class BluetoothBeurerBF600 method requestVendorSpecificUserList.

@Override
protected synchronized void requestVendorSpecificUserList() {
    BluetoothBytesParser parser = new BluetoothBytesParser();
    parser.setIntValue(0x00, FORMAT_UINT8);
    writeBytes(SERVICE_BEURER_CUSTOM_BF600, CHARACTERISTIC_BEURER_BF600_USER_LIST, parser.getValue());
    stopMachineState();
}
Also used : BluetoothBytesParser(com.welie.blessed.BluetoothBytesParser)

Aggregations

BluetoothBytesParser (com.welie.blessed.BluetoothBytesParser)22 Date (java.util.Date)3 ScaleMeasurement (com.health.openscale.core.datatypes.ScaleMeasurement)2 ScaleUser (com.health.openscale.core.datatypes.ScaleUser)2 Converters (com.health.openscale.core.utils.Converters)1 GregorianCalendar (java.util.GregorianCalendar)1