DataFlash: save some flash space on APM2

don't include log message headers that are not used on APM2
This commit is contained in:
Andrew Tridgell
2014-06-30 07:58:42 +10:00
parent 166c1fd530
commit fd87f28a07
2 changed files with 26 additions and 14 deletions
+2
View File
@@ -785,6 +785,7 @@ void DataFlash_Class::Log_Write_IMU(const AP_InertialSensor &ins)
if (ins.get_gyro_count() < 2 && ins.get_accel_count() < 2) {
return;
}
#if INS_MAX_INSTANCES > 1
const Vector3f &gyro2 = ins.get_gyro(1);
const Vector3f &accel2 = ins.get_accel(1);
struct log_IMU pkt2 = {
@@ -814,6 +815,7 @@ void DataFlash_Class::Log_Write_IMU(const AP_InertialSensor &ins)
accel_z : accel3.z
};
WriteBlock(&pkt3, sizeof(pkt3));
#endif
}
// Write a text message to the log