mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
add check for DFMMode after setting it
This commit is contained in:
parent
abf53826b5
commit
79f6b84190
@ -370,6 +370,19 @@ status_t AFBRS50::setRateAndDfm(uint32_t rate_hz, argus_dfm_mode_t dfm_mode)
|
||||
return status;
|
||||
}
|
||||
|
||||
argus_dfm_mode_t result_mode;
|
||||
status = Argus_GetConfigurationDFMMode(_hnd, &result_mode);
|
||||
|
||||
if (status != STATUS_OK) {
|
||||
PX4_ERR("Argus_GetConfigurationDFMMode status not okay: %i", (int)status);
|
||||
return status;
|
||||
}
|
||||
|
||||
if (result_mode != dfm_mode) {
|
||||
PX4_ERR("Argus_SetConfigurationDFMMode failed: %i", (int)status);
|
||||
return status;
|
||||
}
|
||||
|
||||
status = Argus_SetConfigurationFrameTime(_hnd, (1000000 / rate_hz));
|
||||
|
||||
if (status != STATUS_OK) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user