Skip to content

Commit

Permalink
Somewhat more conservative approach towards saving original color on …
Browse files Browse the repository at this point in the history
…calibration
  • Loading branch information
deadprogram committed Feb 9, 2016
1 parent fa5e9d6 commit fbfab18
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/devices/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,10 @@ module.exports = function custom(device) {
device.startCalibration = function(callback) {
device.originalColor = 0;
device.getColor(function(err, data) {
if (err) {
callback(err, null);
if (!err) {
device.originalColor = data.color;
}

device.originalColor = data.color;
device.setRgbLed(0);
device.setBackLed(127);
device.setStabilization(0, callback);
Expand Down

0 comments on commit fbfab18

Please sign in to comment.