Skip to content

Commit

Permalink
Merge pull request #820 from scottgonzalez/led-indent
Browse files Browse the repository at this point in the history
Led: Fix indentation
  • Loading branch information
rwaldron committed Jun 6, 2015
2 parents 83d03e1 + 10df0b2 commit 0e2d245
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions lib/led/led.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,36 +340,36 @@ Led.prototype[Animation.render] = function(position) {
* @param {Object} val An Animation() segment config object
*/

Led.prototype.pulse = function(rate, callback) {
var state = priv.get(this);

var options = {
duration: typeof rate === "number" ? rate : 1000,
keyFrames: [0, 0xff],
metronomic: true,
loop: true,
easing: "inOutSine",
onloop: function() {
if (typeof callback === "function") {
callback();
}
}
};

if (typeof rate === "object") {
__.extend(options, rate);
}

if (typeof rate === "function") {
callback = rate;
}

state.isRunning = true;

state.animation = state.animation || new Animation(this);
state.animation.enqueue(options);
return this;
};
Led.prototype.pulse = function(rate, callback) {
var state = priv.get(this);

var options = {
duration: typeof rate === "number" ? rate : 1000,
keyFrames: [0, 0xff],
metronomic: true,
loop: true,
easing: "inOutSine",
onloop: function() {
if (typeof callback === "function") {
callback();
}
}
};

if (typeof rate === "object") {
__.extend(options, rate);
}

if (typeof rate === "function") {
callback = rate;
}

state.isRunning = true;

state.animation = state.animation || new Animation(this);
state.animation.enqueue(options);
return this;
};

/**
* fade Fade an led in and out
Expand Down

0 comments on commit 0e2d245

Please sign in to comment.