Browse Source

Plane: RangeFinder now handles RFND logging

mission-4.1.18
Peter Barker 6 years ago committed by Peter Barker
parent
commit
a19df642a0
  1. 5
      ArduPlane/Log.cpp
  2. 1
      ArduPlane/system.cpp

5
ArduPlane/Log.cpp

@ -186,7 +186,8 @@ struct PACKED log_Sonar { @@ -186,7 +186,8 @@ struct PACKED log_Sonar {
float correction;
};
// Write a sonar packet
// Write a sonar packet. Note that RFND log messages are written by
// RangeFinder itself as part of update().
void Plane::Log_Write_Sonar()
{
uint16_t distance = 0;
@ -203,8 +204,6 @@ void Plane::Log_Write_Sonar() @@ -203,8 +204,6 @@ void Plane::Log_Write_Sonar()
correction : rangefinder_state.correction
};
logger.WriteBlock(&pkt, sizeof(pkt));
logger.Write_RFND(rangefinder);
}
struct PACKED log_Arm_Disarm {

1
ArduPlane/system.cpp

@ -87,6 +87,7 @@ void Plane::init_ardupilot() @@ -87,6 +87,7 @@ void Plane::init_ardupilot()
barometer.init();
// initialise rangefinder
rangefinder.set_log_rfnd_bit(MASK_LOG_SONAR);
rangefinder.init(ROTATION_PITCH_270);
// initialise battery monitoring

Loading…
Cancel
Save