You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/04/25 00:32:39 UTC

[GitHub] davidzuhn commented on a change in pull request #58: call ble_gatts_chr_updated() on battery level change

davidzuhn commented on a change in pull request #58: call ble_gatts_chr_updated() on battery level change
URL: https://github.com/apache/mynewt-nimble/pull/58#discussion_r183917601
 
 

 ##########
 File path: nimble/host/services/bas/src/ble_svc_bas.c
 ##########
 @@ -118,17 +118,15 @@ ble_svc_bas_on_gap_connect(uint16_t conn_handle)
  */
 int
 ble_svc_bas_battery_level_set(uint8_t level) {
-    int rc = 0;
     if (level > 100)
 	level = 100;
     if (ble_svc_bas_battery_level != level) {
 	ble_svc_bas_battery_level = level;
 #if MYNEWT_VAL(BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY_ENABLE) > 0
-	rc = ble_gattc_notify(ble_svc_bas_conn_handle,
-			      ble_svc_bas_battery_handle);
+        ble_gatts_chr_updated(ble_svc_bas_battery_handle);
 
 Review comment:
   That other code now has been removed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services