Browse Source

DataFlash: correct use of #defines

HIL_BOARD_AVR_SITL was renamed
Move use of define to after include where it is defined
master
Peter Barker 9 years ago committed by Lucas De Marchi
parent
commit
4548466701
  1. 2
      libraries/DataFlash/DataFlash_MAVLink.cpp
  2. 3
      libraries/DataFlash/DataFlash_SITL.h

2
libraries/DataFlash/DataFlash_MAVLink.cpp

@ -527,7 +527,7 @@ bool DataFlash_MAVLink::send_log_block(struct dm_block &block) @@ -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;
}

3
libraries/DataFlash/DataFlash_SITL.h

@ -4,9 +4,10 @@ @@ -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

Loading…
Cancel
Save