(connpath)
| 7 | |
| 8 | @with_sitl |
| 9 | def test_115(connpath): |
| 10 | v = connect(connpath, wait_ready=True) |
| 11 | time.sleep(5) |
| 12 | assert_false(v.capabilities.ftp) |
| 13 | |
| 14 | # versions of ArduCopter prior to v3.3 will send out capabilities |
| 15 | # flags before they are initialised. Vehicle attempts to refetch |
| 16 | # until capabilities are non-zero, but we may need to wait: |
| 17 | start_time = time.time() |
| 18 | nonzero_capabilities = True |
| 19 | slept = False |
| 20 | while v.capabilities.mission_float == 0: |
| 21 | if time.time() > start_time + 30: |
| 22 | nonzero_capabilities = False |
| 23 | break |
| 24 | time.sleep(0.1) |
| 25 | slept = True |
| 26 | if v.capabilities.mission_float: |
| 27 | if slept: |
| 28 | assert_true(v.version.major <= 3) |
| 29 | assert_true(v.version_minor <= 3) |
| 30 | else: |
| 31 | # fail it |
| 32 | assert_true(v.capabilities.mission_float) |
| 33 | |
| 34 | assert_true(v.version.major is not None) |
| 35 | assert_true(len(v.version.release_type()) >= 2) |
| 36 | assert_true(v.version.release_version() is not None) |
nothing calls this directly
no test coverage detected