mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-02 19:53:57 -04:00
Plane: RangeFinder now handles RFND logging
This commit is contained in:
parent
3e51d8c7d7
commit
a19df642a0
@ -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()
|
||||
correction : rangefinder_state.correction
|
||||
};
|
||||
logger.WriteBlock(&pkt, sizeof(pkt));
|
||||
|
||||
logger.Write_RFND(rangefinder);
|
||||
}
|
||||
|
||||
struct PACKED log_Arm_Disarm {
|
||||
|
@ -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…
Reference in New Issue
Block a user