Skip to content

Commit 537c26e

Browse files
committed
ev3dev: make gyro calibrate method private
This method is a bit buggy, so make it private until we get the kinks worked out
1 parent ecfce16 commit 537c26e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

bricks/ev3dev/modules/pybricks/ev3devices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def reset_angle(self, angle):
234234
else:
235235
self.offset = -self._value(0) - angle
236236

237-
def calibrate(self):
237+
def _calibrate(self):
238238
self._reset()
239239
self.reset_angle(0)
240240

lib/fake-pybricks/pybricks/ev3devices.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,11 @@ def reset_angle(self, angle):
442442
"""
443443
pass
444444

445-
def calibrate(self):
446-
"""Calibrate the sensor. This process sets the speed and angle to zero and ensures that the angle value does not drift.
445+
def _calibrate(self):
446+
"""Calibrate the sensor.
447+
448+
This process sets the speed and angle to zero and ensures that the
449+
angle value does not drift.
447450
448451
Make sure that the sensor does not move while calibrating.
449452

0 commit comments

Comments
 (0)