Skip to content

Commit

Permalink
log both mpu6000s
Browse files Browse the repository at this point in the history
  • Loading branch information
jschall committed Feb 27, 2015
1 parent 9cbf505 commit 61e8159
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_InertialSensor/AP_InertialSensor_PX4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void AP_InertialSensor_PX4::_new_accel_sample(uint8_t i, accel_report &accel_rep
// report error count
_set_accel_error_count(frontend_instance, accel_report.error_count);

if(dataflash != NULL && dataflash->logging_started() && frontend_instance == 0) {
if(dataflash != NULL && dataflash->logging_started() && (frontend_instance == 0 || frontend_instance == 2)) {
dataflash->Log_Write_Ins(LOG_ACC1_MSG+frontend_instance, (uint32_t)accel_report.timestamp, accel);
}

Expand Down Expand Up @@ -311,7 +311,7 @@ void AP_InertialSensor_PX4::_new_gyro_sample(uint8_t i, gyro_report &gyro_report
// report error count
_set_gyro_error_count(_gyro_instance[i], gyro_report.error_count);

if(dataflash != NULL && dataflash->logging_started() && frontend_instance == 0) {
if(dataflash != NULL && dataflash->logging_started() && (frontend_instance == 0 || frontend_instance == 2)) {
dataflash->Log_Write_Ins(LOG_GYR1_MSG+frontend_instance, (uint32_t)gyro_report.timestamp, gyro);
}

Expand Down

0 comments on commit 61e8159

Please sign in to comment.