-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fixed Errors! #1209
base: master
Are you sure you want to change the base?
Fixed Errors! #1209
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks correct to me, as mission_item is deprecated. @peterbarker Do you know how the CI works - not reporting anything on this.
…ere was no heartbeat for 30 seconds.
…ere was no heartbeat for 30 seconds.
@morzack What do you think about this one? |
@ShafiqSadat I'm not going to merge this. That has to be done by someone with more technical knowledge. I have requested Peter and John, but this will have to await their attention. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been wanting to do something like this twine thing for a very long time :-)
There are good changes in here, but you've got several unrelated changes mixed into the one PR, making merging anything difficult.
You should also only have a single commit per logical change, and commit messages which actually say what logical change has been made.
dronekit/__init__.py
Outdated
@@ -816,10 +816,10 @@ def __len__(self): | |||
def _update_channel(self, channel, value): | |||
# If we have channels on different ports, we expand the Channels | |||
# object to support them. | |||
channel = int(channel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is strange
dronekit/mavlink.py
Outdated
@@ -245,7 +248,8 @@ def mavlink_thread_in(): | |||
) | |||
|
|||
except APIException as e: | |||
self._logger.exception('Exception in MAVLink input loop') | |||
#self._logger.exception('Exception in MAVLink input loop') | |||
self._logger.warning('%s' % str(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong
|
||
@self.on_message(['HOME_POSITION']) | ||
def listener(self, name, msg): | ||
self._home_location = LocationGlobal(msg.latitude / 1.0e7, msg.longitude / 1.0e7, msg.altitude / 1000.0) | ||
self.notify_attribute_listeners('home_location', self.home_location, cache=True) | ||
|
||
@self.on_message(['WAYPOINT', 'MISSION_ITEM']) | ||
@self.on_message(['WAYPOINT', 'MISSION_ITEM', 'MISSION_ITEM_INT']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug if It is a mission item int then you should divide to 1e7
@@ -2233,7 +2198,7 @@ def simple_goto(self, location, airspeed=None, groundspeed=None): | |||
else: | |||
raise ValueError('Expecting location to be LocationGlobal or LocationGlobalRelative.') | |||
|
|||
self._master.mav.mission_item_send(0, 0, 0, frame, | |||
self._master.mav.mission_item_int_send(0, 0, 0, frame, | |||
mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 2, 0, 0, | |||
0, 0, 0, location.lat, location.lon, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conversion issu int(location.lat * 1e7), int(location.lon * 1e7)
Fixes #1208