Skip to content

Commit bb3de8a

Browse files
authored
rename safe_heading to heading_name and re-instate the parameter (#43)
* rename safe_heading to heading_name and re-instate the parameter * rename from heading_name to convert_heading * add punctuation * fix - change name of method in library description section
1 parent 633fae2 commit bb3de8a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Python/di_sensors/easy_inertial_measurement_unit.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ def safe_calibration_status(self):
138138
ifMutexRelease(self.use_mutex)
139139
return status
140140

141-
def safe_heading(self):
141+
def convert_heading(self, in_heading):
142142
"""
143-
Determines the heading of the sensor (robot).
144-
This function doesn't take into account the declination.
143+
This method takes in a heading in degrees and return the name of the corresponding heading.
144+
:param float in_heading: the value in degree that needs to be converted to a string.
145145
146146
:return: The heading of the sensor as a string.
147147
:rtype: str
@@ -156,7 +156,6 @@ def safe_heading(self):
156156
157157
"""
158158

159-
in_heading = self.safe_north_point()
160159
headings = ["North", "North East",
161160
"East", "South East",
162161
"South", "South West",

docs/source/structure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Easy - IMU
144144
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.reconfig_bus
145145
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_calibrate
146146
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_calibration_status
147-
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_heading
147+
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.convert_heading
148148
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_read_euler
149149
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_read_magnetometer
150150
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_north_point

0 commit comments

Comments
 (0)