Skip to content

Commit

Permalink
autotest: adjust for notch blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed May 25, 2024
1 parent 7d0a2e0 commit 0db55a2
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6119,8 +6119,11 @@ def DynamicRpmNotches(self):
esc_hz = self.get_average_esc_frequency()
esc_peakdb1 = psd["X"][int(esc_hz)]

# now add notch-per motor and check that the peak is squashed
self.set_parameter("INS_HNTCH_OPTS", 2)
# now add notch-per motor at f/4 and check that the peak is squashed
self.set_parameters({
"INS_HNTCH_OPTS": 2,
"INS_HNTCH_BW": 20,
})
self.reboot_sitl()

freq, hover_throttle, peakdb2, psd = \
Expand All @@ -6147,6 +6150,8 @@ def DynamicRpmNotches(self):
try:
self.progress("Flying Octacopter with ESC telemetry driven dynamic notches")
self.set_parameter("INS_HNTCH_OPTS", 0)
self.set_parameter("INS_HNTCH_BW", 40)

self.customise_SITL_commandline(
[],
defaults_filepath=','.join(self.model_defaults_filepath("octa")),
Expand All @@ -6159,8 +6164,11 @@ def DynamicRpmNotches(self):
esc_peakdb1 = psd["X"][int(esc_hz)]

# now add notch-per motor and check that the peak is squashed
self.set_parameter("INS_HNTCH_HMNCS", 1)
self.set_parameter("INS_HNTCH_OPTS", 2)
self.set_parameters({
"INS_HNTCH_OPTS": 2,
"INS_HNTCH_BW": 20,
"INS_HNTCH_HMNCS": 1
})
self.reboot_sitl()

freq, hover_throttle, peakdb2, psd = \
Expand Down

0 comments on commit 0db55a2

Please sign in to comment.