From 6d0a4b99d80680d4446f022e297817d73bf8aff1 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Fri, 31 Mar 2017 15:08:11 -0400 Subject: [PATCH] refactoring: nicer error message --- firmware/controllers/algo/obd_error_codes.h | 2 +- firmware/controllers/sensors/thermistors.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/algo/obd_error_codes.h b/firmware/controllers/algo/obd_error_codes.h index 7b42fd465c..0603a12cd2 100644 --- a/firmware/controllers/algo/obd_error_codes.h +++ b/firmware/controllers/algo/obd_error_codes.h @@ -1813,7 +1813,7 @@ typedef enum { CUSTOM_ERR_6111 = 6111, CUSTOM_ERR_MAP_TYPE = 6112, CUSTOM_ERR_THERM = 6113, - CUSTOM_ERR_LOG_ERROR = 6114, + CUSTOM_ERR_NATURAL_LOGARITHM_ERROR = 6114, CUSTOM_ERR_LOOPED_QUEUE = 6115, CUSTOM_ERR_PWM_1 = 6116, CUSTOM_ERR_PWM_2 = 6117, diff --git a/firmware/controllers/sensors/thermistors.cpp b/firmware/controllers/sensors/thermistors.cpp index 9951af683c..e737ea3b61 100644 --- a/firmware/controllers/sensors/thermistors.cpp +++ b/firmware/controllers/sensors/thermistors.cpp @@ -140,7 +140,7 @@ void ThermistorMath::prepareThermistorCurve(thermistor_conf_s *tc) { float L1 = logf(tc->resistance_1); if (L1 == tc->resistance_1) { - firmwareError(CUSTOM_ERR_LOG_ERROR, "log is broken?"); + firmwareError(CUSTOM_ERR_NATURAL_LOGARITHM_ERROR, "Natural logarithm logf() is broken: %f", tc->resistance_1); } float L2 = logf(tc->resistance_2); float L3 = logf(tc->resistance_3);