Browse Source

DataFlash: prevent build errors on non-PX4 targets

mission-4.1.18
Andrew Tridgell 10 years ago
parent
commit
d0087c91e9
  1. 2
      libraries/DataFlash/DataFlash.h
  2. 2
      libraries/DataFlash/LogFile.cpp

2
libraries/DataFlash/DataFlash.h

@ -14,7 +14,9 @@ @@ -14,7 +14,9 @@
#include <AP_AHRS.h>
#include <stdint.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
#include <uORB/topics/esc_status.h>
#endif
#if HAL_CPU_CLASS < HAL_CPU_CLASS_75 && defined(APM_BUILD_DIRECTORY)

2
libraries/DataFlash/LogFile.cpp

@ -1061,6 +1061,7 @@ void DataFlash_Class::Log_Write_Camera(const AP_AHRS &ahrs, const AP_GPS &gps, c @@ -1061,6 +1061,7 @@ void DataFlash_Class::Log_Write_Camera(const AP_AHRS &ahrs, const AP_GPS &gps, c
// Write ESC status messages
void DataFlash_Class::Log_Write_ESC(void)
{
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
static int _esc_status_sub = -1;
struct esc_status_s esc_status;
@ -1095,4 +1096,5 @@ void DataFlash_Class::Log_Write_ESC(void) @@ -1095,4 +1096,5 @@ void DataFlash_Class::Log_Write_ESC(void)
}
}
}
#endif // CONFIG_HAL_BOARD
}

Loading…
Cancel
Save