Skip to content

Commit

Permalink
Merge branch 'ArduPilot:master' into NarinFC-H7
Browse files Browse the repository at this point in the history
  • Loading branch information
vololand authored Feb 5, 2025
2 parents b23a321 + 400699f commit 0816d52
Show file tree
Hide file tree
Showing 36 changed files with 5,206 additions and 5,150 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cygwin_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down Expand Up @@ -74,6 +75,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/qurt_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down Expand Up @@ -74,6 +75,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_replay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down Expand Up @@ -81,6 +82,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_sitl_blimp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down Expand Up @@ -88,6 +89,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_sitl_copter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down Expand Up @@ -87,6 +88,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_sitl_periph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/bootloaders/**'
- 'Tools/CHDK-Script/**'
Expand Down Expand Up @@ -86,6 +87,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/bootloaders/**'
- 'Tools/CHDK-Script/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_sitl_plane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down Expand Up @@ -87,6 +88,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_sitl_rover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down Expand Up @@ -87,6 +88,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_sitl_sub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down Expand Up @@ -88,6 +89,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_sitl_tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down Expand Up @@ -88,6 +89,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/AP_Periph/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# Remove change on other workflows
- '.github/workflows/test_environment.yml'
pull_request:
Expand Down Expand Up @@ -88,6 +89,7 @@ on:
# remove non SITL HAL
- 'libraries/AP_HAL_ChibiOS/**'
- 'libraries/AP_HAL_ESP32/**'
- 'libraries/AP_HAL_QURT/**'
# Remove change on other workflows
- '.github/workflows/test_environment.yml'
workflow_dispatch:
Expand Down
4 changes: 3 additions & 1 deletion Rover/AP_Arming_Rover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ bool AP_Arming_Rover::rc_calibration_checks(const bool display_failure)
// performs pre_arm gps related checks and returns true if passed
bool AP_Arming_Rover::gps_checks(bool display_failure)
{
if (!rover.control_mode->requires_position() && !rover.control_mode->requires_velocity()) {
if (!require_location &&
!rover.control_mode->requires_position() &&
!rover.control_mode->requires_velocity()) {
// we don't care!
return true;
}
Expand Down
2 changes: 2 additions & 0 deletions Tools/ardupilotwaf/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def configure_env(self, cfg, env):
'-Wno-gnu-variable-sized-type-not-at-end',
'-Werror=implicit-fallthrough',
'-cl-single-precision-constant',
'-Wno-vla-cxx-extension',
]
else:
env.CFLAGS += [
Expand Down Expand Up @@ -419,6 +420,7 @@ def configure_env(self, cfg, env):

'-Wno-gnu-designator',
'-Wno-mismatched-tags',
'-Wno-vla-cxx-extension',
'-Wno-gnu-variable-sized-type-not-at-end',
'-Werror=implicit-fallthrough',
'-cl-single-precision-constant',
Expand Down
10 changes: 0 additions & 10 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12243,16 +12243,6 @@ def GripperReleaseOnThrustLoss(self):
self.context_pop()
self.reboot_sitl()

def assert_home_position_not_set(self):
try:
self.poll_home_position()
except NotAchievedException:
return

# if home.lng != 0: etc

raise NotAchievedException("Home is set when it shouldn't be")

def REQUIRE_LOCATION_FOR_ARMING(self):
'''check AP_Arming::Option::REQUIRE_LOCATION_FOR_ARMING works'''
self.context_push()
Expand Down
26 changes: 26 additions & 0 deletions Tools/autotest/rover.py
Original file line number Diff line number Diff line change
Expand Up @@ -6947,6 +6947,31 @@ def SDPolyFence(self):

self.delay_sim_time(1000)

def REQUIRE_LOCATION_FOR_ARMING(self):
'''check DriveOption::REQUIRE_POSITION_FOR_ARMING works'''
self.context_push()
self.set_parameters({
"SIM_GPS1_NUMSATS": 3, # EKF does not like < 6
"AHRS_GPS_USE": 0, # stop DCM supplying home
})
self.reboot_sitl()
self.change_mode('MANUAL')
self.wait_prearm_sys_status_healthy()
self.assert_home_position_not_set()
self.arm_vehicle()
self.disarm_vehicle()

self.change_mode('GUIDED')
self.assert_prearm_failure("waiting for home", other_prearm_failures_fatal=False)

self.change_mode('MANUAL')
self.set_parameters({
"ARMING_NEED_LOC": 1,
})
self.assert_prearm_failure("waiting for home", other_prearm_failures_fatal=False)
self.context_pop()
self.reboot_sitl()

def tests(self):
'''return list of all tests'''
ret = super(AutoTestRover, self).tests()
Expand Down Expand Up @@ -7045,6 +7070,7 @@ def tests(self):
self.ClearMission,
self.JammingSimulation,
self.BatteryInvalid,
self.REQUIRE_LOCATION_FOR_ARMING,
])
return ret

Expand Down
14 changes: 12 additions & 2 deletions Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3625,6 +3625,16 @@ def assert_bytes_equal(self, bytes1, bytes2, maxlen=None):
if bytes1[i] != bytes2[i]:
raise NotAchievedException("differ at offset %u" % i)

def assert_home_position_not_set(self):
try:
self.poll_home_position()
except NotAchievedException:
return

# if home.lng != 0: etc

raise NotAchievedException("Home is set when it shouldn't be")

def HIGH_LATENCY2(self):
'''test sending of HIGH_LATENCY2'''

Expand Down Expand Up @@ -8360,8 +8370,8 @@ def assert_prearm_failure(self,
now = self.get_sim_time_cached()
if now - tstart > timeout:
raise NotAchievedException(
"Did not see failure-to-arm messages (statustext=%s command_ack=%s" %
(seen_statustext, seen_command_ack))
f"Did not see failure-to-arm messages ({seen_statustext=} {expected_statustext=} {seen_command_ack=})"
)
if now - arm_last_send > 1:
arm_last_send = now
self.send_mavlink_run_prearms_command()
Expand Down
Binary file modified Tools/bootloaders/CubeNode-ETH_bl.bin
Binary file not shown.
Loading

0 comments on commit 0816d52

Please sign in to comment.