Skip to content

Commit

Permalink
Move onMeasumentChangeBinded constructor to notifyMeasument
Browse files Browse the repository at this point in the history
  • Loading branch information
hotchpotch committed Feb 28, 2016
1 parent e4981f3 commit 9d8f996
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion examples/hrm-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ if (!idOrName) {

var HRMDevice = function(device) {
NobleDevice.call(this, device);
NobleDevice.HeartRateMeasumentService.call(this);
};

HRMDevice.is = function(device) {
Expand Down
2 changes: 1 addition & 1 deletion lib/heart-rate-measument-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var BODY_SENSOR_LOCATION_UUID = '2a38';
var CONTROL_POINT_UUID = '2a39';

function HeartRateMeasumentService() {
this.onMeasumentChangeBinded = this.onMeasumentChange.bind(this);
}

HeartRateMeasumentService.prototype.readBodySensorLocation = function(callback) {
Expand All @@ -17,6 +16,7 @@ HeartRateMeasumentService.prototype.writeControllPoint = function(data, callback


HeartRateMeasumentService.prototype.notifyMeasument = function(callback) {
this.onMeasumentChangeBinded = this.onMeasumentChange.bind(this);
this.notifyCharacteristic(HEART_RATE_MEASUREMENT_SERVICE_UUID, MEASUREMENT_UUID, true, this.onMeasumentChangeBinded, callback);
};

Expand Down

0 comments on commit 9d8f996

Please sign in to comment.