diff --git a/firmware/controllers/core/interpolation.cpp b/firmware/controllers/core/interpolation.cpp index 210d6b1a95..e0d17bb94c 100644 --- a/firmware/controllers/core/interpolation.cpp +++ b/firmware/controllers/core/interpolation.cpp @@ -2,6 +2,9 @@ * @file interpolation.cpp * @brief Linear interpolation algorithms * + * See test_interpolation_3d.cpp + * + * * @date Oct 17, 2013 * @author Andrey Belomutskiy, (c) 2012-2018 * @author Dmitry Sidin, (c) 2015 diff --git a/unit_tests/test_basic_math/test_interpolation_3d.cpp b/unit_tests/test_basic_math/test_interpolation_3d.cpp index 588210f66d..8ccc929a6e 100644 --- a/unit_tests/test_basic_math/test_interpolation_3d.cpp +++ b/unit_tests/test_basic_math/test_interpolation_3d.cpp @@ -1,12 +1,10 @@ /* + * @file test_interpolation_3d.cpp + * * Created on: Oct 17, 2013 * @author Andrey Belomutskiy, (c) 2012-2018 */ -/** - * @file test_interpolation_3d.c - */ - #include "test_interpolation_3d.h" #include @@ -61,6 +59,13 @@ static void newTestToComfirmInterpolation() { assertEqualsM("middle @ 2.3 ",35.15, getValue(/*rpm*/250, 2.3)); assertEqualsM("middle cell ", 54.25, getValue(/*rpm*/250, 2.5)); + + // issue #604: interpolation outside of the table + assertEqualsM("800 @ 2.1 ",200, getValue(/*rpm*/800, 2.1)); + assertEqualsM("800 @ 2.3 ",200, getValue(/*rpm*/800, 2.3)); + assertEqualsM("800 @ 3.3 ",500, getValue(/*rpm*/800, 3.3)); + + } void testInterpolate3d(void) {