mirror of https://github.com/ArduPilot/ardupilot
DataFlash: fix test for SITL and linux
This commit is contained in:
parent
b1ce6136c4
commit
a2f1bf581a
|
@ -8,6 +8,7 @@
|
|||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_HAL_AVR/AP_HAL_AVR.h>
|
||||
#include <AP_HAL_SITL/AP_HAL_SITL.h>
|
||||
#include <AP_HAL_Linux/AP_HAL_Linux.h>
|
||||
#include <AP_HAL_Empty/AP_HAL_Empty.h>
|
||||
#include <AP_HAL_PX4/AP_HAL_PX4.h>
|
||||
|
||||
|
@ -107,8 +108,8 @@ void DataFlashTest::setup(void)
|
|||
v2 : (uint16_t)(2001 + i),
|
||||
v3 : (uint16_t)(2002 + i),
|
||||
v4 : (uint16_t)(2003 + i),
|
||||
l1 : (long)i * 5000,
|
||||
l2 : (long)i * 16268
|
||||
l1 : (int32_t)(i * 5000),
|
||||
l2 : (int32_t)(i * 16268)
|
||||
};
|
||||
dataflash.WriteBlock(&pkt, sizeof(pkt));
|
||||
total_micros += hal.scheduler->micros() - start;
|
||||
|
@ -116,7 +117,11 @@ void DataFlashTest::setup(void)
|
|||
}
|
||||
|
||||
hal.console->printf("Average write time %.1f usec/byte\n",
|
||||
(double)total_micros/((float)i*sizeof(struct log_Test)));
|
||||
(double)total_micros/((double)i*sizeof(struct log_Test)));
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
||||
dataflash.flush();
|
||||
#endif
|
||||
|
||||
hal.scheduler->delay(100);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ LIBRARIES += AP_GPS
|
|||
LIBRARIES += AP_HAL
|
||||
LIBRARIES += AP_HAL_AVR
|
||||
LIBRARIES += AP_HAL_Empty
|
||||
LIBRARIES += AP_HAL_Linux
|
||||
LIBRARIES += AP_HAL_PX4
|
||||
LIBRARIES += AP_HAL_SITL
|
||||
LIBRARIES += AP_InertialSensor
|
||||
|
@ -18,6 +19,7 @@ LIBRARIES += AP_Math
|
|||
LIBRARIES += AP_Mission
|
||||
LIBRARIES += AP_NavEKF
|
||||
LIBRARIES += AP_Notify
|
||||
LIBRARIES += AP_OpticalFlow
|
||||
LIBRARIES += AP_Param
|
||||
LIBRARIES += AP_Progmem
|
||||
LIBRARIES += AP_Rally
|
||||
|
@ -28,4 +30,5 @@ LIBRARIES += AP_Vehicle
|
|||
LIBRARIES += DataFlash
|
||||
LIBRARIES += Filter
|
||||
LIBRARIES += GCS_MAVLink
|
||||
LIBRARIES += SITL
|
||||
LIBRARIES += StorageManager
|
||||
|
|
Loading…
Reference in New Issue