/// <summary> /// Start notification on a specified navigation value /// </summary> /// <param name="value">Navigation value to start being notified</param> /// <returns>true if the operation succeeded, false otherwise</returns> public async Task <bool> StartNotification(NavigationValue value) { bool ret; // List characteristics ret = await InitCharacteristics(); if (ret) { // Look for the selected characteristic BleGattCharacteristic nav_characteristic = _navigation_characteristics[value]; ret = await BleDevice.RegisterValueNotificationAsync(nav_characteristic, OnNavigationNotification); } return(ret); }
/// <summary> /// Start notification on a specified variometer value /// </summary> /// <param name="value">Variometer value to start being notified</param> /// <returns>true if the operation succeeded, false otherwise</returns> public async Task <bool> StartNotification(VariometerValue value) { bool ret; // List characteristics ret = await InitCharacteristics(); if (ret) { // Look for the selected characteristic BleGattCharacteristic vario_characteristic = _variometer_characteristics[value]; ret = await BleDevice.RegisterValueNotificationAsync(vario_characteristic, OnVariometerNotification); } return(ret); }
/// <summary> /// Start notification on a specified altitude value /// </summary> /// <param name="altitude">Altitude to start being notified</param> /// <returns>true if the operation succeeded, false otherwise</returns> public async Task <bool> StartNotification(Altitude altitude) { bool ret; // List characteristics ret = await InitCharacteristics(); if (ret) { // Look for the selected characteristic BleGattCharacteristic alti_characteristic = _altitude_characteristics[altitude]; ret = await BleDevice.RegisterValueNotificationAsync(alti_characteristic, OnAltitudeNotification); } return(ret); }