Skip to content

rename safe_heading to heading_name and re-instate the parameter #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Python/di_sensors/easy_inertial_measurement_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ def safe_calibration_status(self):
ifMutexRelease(self.use_mutex)
return status

def safe_heading(self):
def convert_heading(self, in_heading):
"""
Determines the heading of the sensor (robot).
This function doesn't take into account the declination.
This method takes in a heading in degrees and return the name of the corresponding heading.
:param float in_heading: the value in degree that needs to be converted to a string.

:return: The heading of the sensor as a string.
:rtype: str
Expand All @@ -156,7 +156,6 @@ def safe_heading(self):

"""

in_heading = self.safe_north_point()
headings = ["North", "North East",
"East", "South East",
"South", "South West",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Easy - IMU
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.reconfig_bus
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_calibrate
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_calibration_status
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_heading
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.convert_heading
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_read_euler
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_read_magnetometer
di_sensors.easy_inertial_measurement_unit.EasyIMUSensor.safe_north_point
Expand Down