diff --git a/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.pde b/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.pde index 097c8cb965..cdad2da4b3 100644 --- a/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.pde +++ b/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.pde @@ -61,8 +61,8 @@ static float get_declination(float lat, float lon) uint8_t latmin_index, lonmin_index; // Validate input values - lat = constrain(lat, -90, 90); - lon = constrain(lon, -180, 180); + lat = constrain_float(lat, -90, 90); + lon = constrain_float(lon, -180, 180); latmin = floor(lat/5)*5; lonmin = floor(lon/5)*5;