Skip to content

Commit

Permalink
IMU/Multi: rename "state" => "calibration" to disambiguate from broad…
Browse files Browse the repository at this point in the history
…er used "state" var.

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Sep 16, 2016
1 parent 817b96a commit 07bd30c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/imu.js
Expand Up @@ -571,11 +571,11 @@ var Drivers = {
var readCalibration = function() {
io.i2cReadOnce(address, this.REGISTER.CALIBRATION, 1, function(data) {

var state = data[0];
var didCalibrationChange = computed.calibration !== state;
var calibration = data[0];
var didCalibrationChange = computed.calibration !== calibration;


computed.calibration = state;
computed.calibration = calibration;

// it is useful, possibly to know when the calibration state changes
// some of the calibrations are a little picky to get right, so emitting
Expand All @@ -585,7 +585,7 @@ var Drivers = {
this.emit("calibration", computed.calibration);
}

if ((state & calibrationMask) === calibrationMask) {
if ((calibration & calibrationMask) === calibrationMask) {

// emit the calibration state so we can work out in our userspace if
// we are good to go, and for when we are performing the calibration steps
Expand Down

0 comments on commit 07bd30c

Please sign in to comment.