Commit 0054fac2 authored by Fabien Lahoudere's avatar Fabien Lahoudere Committed by Enric Balletbo i Serra

test_cros_ec_accel_iio_data_is_valid: Fix the use of local variables

ACCEL_1G_IN_MS2 and ACCEL_MAG_VALID_OFFSET variables
are not global to the class but local to the function.
Signed-off-by: default avatarFabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent 6b3273b4
......@@ -267,8 +267,8 @@ class TestCrosEC(unittest.TestCase):
if devtype.startswith("cros-ec-accel"):
location = read_sysfs_file(base_path + "location")
accel_scale = float(read_sysfs_file(base_path + "scale"))
exp = self.ACCEL_1G_IN_MS2
err = exp * self.ACCEL_MAG_VALID_OFFSET
exp = ACCEL_1G_IN_MS2
err = exp * ACCEL_MAG_VALID_OFFSET
mag = 0
for axis in ['x', 'y', 'z']:
axis_path = base_path + "in_accel_" + axis + "_raw"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment