DataFlash: correct use of #defines

HIL_BOARD_AVR_SITL was renamed
Move use of define to after include where it is defined
This commit is contained in:
Peter Barker 2016-01-21 11:41:11 +11:00 committed by Lucas De Marchi
parent a77dd59dc6
commit 4548466701
2 changed files with 3 additions and 2 deletions

View File

@ -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;
}

View File

@ -4,9 +4,10 @@
#ifndef __DATAFLASH_SITL_H__
#define __DATAFLASH_SITL_H__
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL/AP_HAL.h>
#include "DataFlash_Block.h"
class DataFlash_SITL : public DataFlash_Block