DataFlash: prevent build errors on non-PX4 targets

This commit is contained in:
Andrew Tridgell 2014-11-21 14:48:44 +11:00
parent 1d0122e6c2
commit d0087c91e9
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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)
}
}
}
#endif // CONFIG_HAL_BOARD
}