AP_Terrain: Avoid update() IO operations when not enabled

This commit is contained in:
Jaaaky 2020-01-22 10:38:28 +02:00 committed by Andrew Tridgell
parent eee18942b5
commit e8df08a4d3

View File

@ -296,6 +296,7 @@ float AP_Terrain::lookahead(float bearing, float distance, float climb_ratio)
*/
void AP_Terrain::update(void)
{
if (!enable) { return; }
// just schedule any needed disk IO
schedule_disk_io();