Copter: added RPM dataflash logging

This commit is contained in:
Andrew Tridgell 2015-08-07 20:34:27 +10:00 committed by Randy Mackay
parent 10b8192463
commit cb423eb2f4

View File

@ -75,6 +75,11 @@ int16_t Copter::read_sonar(void)
void Copter::rpm_update(void)
{
rpm_sensor.update();
if (rpm_sensor.healthy(0) || rpm_sensor.healthy(1)) {
if (should_log(MASK_LOG_RCIN)) {
DataFlash.Log_Write_RPM(rpm_sensor);
}
}
}
// initialise compass