Skip to content

Commit

Permalink
Improved clarity of the delegate scope
Browse files Browse the repository at this point in the history
  • Loading branch information
harrychin committed Oct 15, 2020
1 parent 676cb00 commit 69a201f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ module GenericChannelHeartRateBarrel {
// Sets the delegate handler for asynchronous sensor events
// An application can only have 1 registered delegate. Subsequent calls to this function will override the current delegate.
// Setting this to null will remove any registered delegate.
function setDelegate( hrSensorDelegate ) {
hrSensorDelegate = hrSensorDelegate;
function setDelegate( delegate ) {
hrSensorDelegate = delegate;

if ( hrSensorDelegate != null ) {
onUpdateCallback = hrSensorDelegate.method(:onHeartRateSensorUpdate);
Expand Down

0 comments on commit 69a201f

Please sign in to comment.