mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 03:03:34 +08:00
IO firmware: Run critical timing operations as atomic
This is required as we might be in interrupt context on this bare-metal target.
This commit is contained in:
@@ -119,7 +119,7 @@ mixer_tick(void)
|
||||
|
||||
/* check that we are receiving fresh data from the FMU */
|
||||
if ((system_state.fmu_data_received_time == 0) ||
|
||||
hrt_elapsed_time(&system_state.fmu_data_received_time) > FMU_INPUT_DROP_LIMIT_US) {
|
||||
hrt_elapsed_time_atomic(&system_state.fmu_data_received_time) > FMU_INPUT_DROP_LIMIT_US) {
|
||||
|
||||
/* too long without FMU input, time to go to failsafe */
|
||||
if (r_status_flags & PX4IO_P_STATUS_FLAGS_FMU_OK) {
|
||||
|
||||
Reference in New Issue
Block a user