Skip to content
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

AP_HAL_SITL: initialize rcout safety state #27611

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Tools/autotest/rover.py
Original file line number Diff line number Diff line change
Expand Up @@ -6042,10 +6042,10 @@ def FRAMStorage(self):
def RangeFinder(self):
'''Test RangeFinder'''
# the following magic numbers correspond to the post locations in SITL
home_string = "%s,%s,%s,%s" % (51.8752066, 14.6487840, 54.15, 315)
home_string = "%s,%s,%s,%s" % (51.8752066, 14.6487840, 54.15, 231)

rangefinder_params = {
"SIM_SONAR_ROT": 6,
"SIM_SONAR_ROT": 0,
}
rangefinder_params.update(self.analog_rangefinder_parameters())

Expand All @@ -6060,7 +6060,7 @@ def RangeFinder(self):
if m.voltage == 0:
raise NotAchievedException("Did not get non-zero voltage")
want_range = 10
if abs(m.distance - want_range) > 0.1:
if abs(m.distance - want_range) > 0.5:
raise NotAchievedException("Expected %fm got %fm" % (want_range, m.distance))

def DepthFinder(self):
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_SITL/RCOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class HALSITL::RCOutput : public AP_HAL::RCOutput {
bool _corked;
uint16_t _pending[SITL_NUM_CHANNELS];

AP_HAL::Util::safety_state safety_state;
AP_HAL::Util::safety_state safety_state = AP_HAL::Util::safety_state::SAFETY_DISARMED;
};

#endif
Loading