diff --git a/libraries/DataFlash/DataFlash_MAVLink.cpp b/libraries/DataFlash/DataFlash_MAVLink.cpp index d93c837406..b9d1d6397b 100644 --- a/libraries/DataFlash/DataFlash_MAVLink.cpp +++ b/libraries/DataFlash/DataFlash_MAVLink.cpp @@ -527,7 +527,7 @@ bool DataFlash_MAVLink::send_log_block(struct dm_block &block) if (comm_get_txspace(chan) < 500) { return false; } -#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL +#if CONFIG_HAL_BOARD == HAL_BOARD_SITL if (rand() < 0.1) { return false; } diff --git a/libraries/DataFlash/DataFlash_SITL.h b/libraries/DataFlash/DataFlash_SITL.h index 0a01f38f43..a6f5843398 100644 --- a/libraries/DataFlash/DataFlash_SITL.h +++ b/libraries/DataFlash/DataFlash_SITL.h @@ -4,9 +4,10 @@ #ifndef __DATAFLASH_SITL_H__ #define __DATAFLASH_SITL_H__ +#include + #if CONFIG_HAL_BOARD == HAL_BOARD_SITL -#include #include "DataFlash_Block.h" class DataFlash_SITL : public DataFlash_Block