mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
Plane: provide terrain height to rangefinder
used for power saving
This commit is contained in:
parent
64dfc68784
commit
422d0f05bd
@ -1060,6 +1060,13 @@ static void terrain_update(void)
|
||||
{
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
terrain.update();
|
||||
|
||||
// tell the rangefinder our height, so it can go into power saving
|
||||
// mode if available
|
||||
float height;
|
||||
if (terrain.height_above_terrain(height, true)) {
|
||||
rangefinder.set_estimated_terrain_height(height);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user