From 07bd30cb88fc30ecb7a1fc5dd93a8a06a56e26ba Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 16 Sep 2016 15:17:57 -0400 Subject: [PATCH] IMU/Multi: rename "state" => "calibration" to disambiguate from broader used "state" var. Signed-off-by: Rick Waldron --- lib/imu.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/imu.js b/lib/imu.js index 66e78579e..caa92052b 100644 --- a/lib/imu.js +++ b/lib/imu.js @@ -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 @@ -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