Skip to content

Commit ecc7352

Browse files
committed
QA: Remove trailing whitespace.
1 parent 5ed3641 commit ecc7352

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/magnetometer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
while True:
3131
# Read the current, uncalibrated, X, Y & Z magnetic values from the magnetometer and save as a list
3232
mag = list(imu.read_magnetometer_data())
33-
33+
3434
# Step through each uncalibrated X, Y & Z magnetic value and calibrate them the best we can
3535
for i in range(3):
3636
v = mag[i]
@@ -42,10 +42,10 @@
4242
# ie save a new highest possible value for our calibration of this axis
4343
if v > amax[i]:
4444
amax[i] = v
45-
45+
4646
# Calibrate value by removing any offset when compared to the lowest reading seen for this axes
4747
mag[i] -= amin[i]
48-
48+
4949
# Scale value based on the higest range of values seen for this axes
5050
# Creates a calibrated value between 0 and 1 representing magnetic value
5151
try:
@@ -64,7 +64,7 @@
6464
# If heading is negative, convert to positive, 2 x pi is a full circle in Radians
6565
if heading < 0:
6666
heading += 2 * math.pi
67-
67+
6868
# Convert heading from Radians to Degrees
6969
heading = math.degrees(heading)
7070
# Round heading to nearest full degree

0 commit comments

Comments
 (0)