-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #611 from fnoop/master
#610: Wrap iterable call in try..except to deal with unrecognised vehicle codes
- Loading branch information
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
Simple test to trigger a bug in Vehicle class: issue #610 fixed in PR #611 | ||
""" | ||
|
||
import time | ||
import sys | ||
import os | ||
from dronekit import connect, VehicleMode | ||
from dronekit.test import with_sitl | ||
from nose.tools import assert_equals | ||
|
||
@with_sitl | ||
def test_timeout(connpath): | ||
v = connect(connpath) | ||
|
||
# Set the vehicle and autopilot type to 'unsupported' types that MissionPlanner uses as of 17.Apr.2016 | ||
v._vehicle_type = 6 | ||
v._autopilot_type = 8 | ||
|
||
# The above types trigger 'TypeError: argument of type 'NoneType' is not iterable' which is addressed in issue #610 | ||
is_available = v._is_mode_available(0) | ||
|
||
v.close() |