Skip to content

Commit

Permalink
AP_Logger_MAVLink: Remove code that changes behavior when in SITL
Browse files Browse the repository at this point in the history
The removed code changed behavior of the send_log_block function when
simulating with SITL. While I can understand the intention I do not
think that it is the right way to do it and has the potential to confuse
people debugging stuff with SITL and comparing to the real world.
  • Loading branch information
booo authored and peterbarker committed Apr 4, 2024
1 parent 9489e6b commit 1e2600c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions libraries/AP_Logger/AP_Logger_MAVLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,13 +577,6 @@ bool AP_Logger_MAVLink::send_log_block(struct dm_block &block)
return false;
}

#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
// deliberately fail 10% of the time in SITL:
if ((rand() % 100 + 1) < 10) {
return false;
}
#endif

#if DF_MAVLINK_DISABLE_INTERRUPTS
void *istate = hal.scheduler->disable_interrupts_save();
#endif
Expand Down

0 comments on commit 1e2600c

Please sign in to comment.