From d20ac67d63b60f3b08bc909f014e4242ebfee775 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 2 Apr 2017 01:46:27 -0400 Subject: [PATCH] #375 --- firmware/Makefile | 2 +- firmware/controllers/sensors/thermistors.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/firmware/Makefile b/firmware/Makefile index 43bb59c408..d4815b67b1 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -59,7 +59,7 @@ endif # Architecture or project specific options # -USE_FPU = hard +USE_FPU = softfp # Enables the use of FPU on Cortex-M4 (no, softfp, hard). ifeq ($(USE_FPU),) diff --git a/firmware/controllers/sensors/thermistors.cpp b/firmware/controllers/sensors/thermistors.cpp index e737ea3b61..0faf312273 100644 --- a/firmware/controllers/sensors/thermistors.cpp +++ b/firmware/controllers/sensors/thermistors.cpp @@ -140,6 +140,10 @@ void ThermistorMath::prepareThermistorCurve(thermistor_conf_s *tc) { float L1 = logf(tc->resistance_1); if (L1 == tc->resistance_1) { + /** + * See https://github.com/rusefi/rusefi/issues/375 + * See https://sourceforge.net/p/rusefi/tickets/149/ + */ firmwareError(CUSTOM_ERR_NATURAL_LOGARITHM_ERROR, "Natural logarithm logf() is broken: %f", tc->resistance_1); } float L2 = logf(tc->resistance_2);