From 4854d123bb4cb60303c277d0ea55258f571d7790 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sun, 19 Apr 2020 21:48:14 -0400 Subject: [PATCH] PWM name into warning message --- firmware/controllers/algo/obd_error_codes.h | 2 +- firmware/controllers/system/timer/pwm_generator_logic.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/firmware/controllers/algo/obd_error_codes.h b/firmware/controllers/algo/obd_error_codes.h index 9fde1bd93e..8ef9b576b2 100644 --- a/firmware/controllers/algo/obd_error_codes.h +++ b/firmware/controllers/algo/obd_error_codes.h @@ -2073,7 +2073,7 @@ typedef enum { CUSTOM_ERR_TIMER_TEST_CALLBACK_WRONG_TIME = 6708, CUSTOM_ERR_6709 = 6709, CUSTOM_DUTY_INVALID = 6710, - CUSTOM_DUTY_TOO_HIGH = 6711, + CUSTOM_PWM_DUTY_TOO_HIGH = 6711, CUSTOM_ERR_PWM_STATE_ASSERT = 6712, CUSTOM_ERR_PWM_CALLBACK_ASSERT = 6713, CUSTOM_ERR_PWM_SWITCH_ASSERT = 6714, diff --git a/firmware/controllers/system/timer/pwm_generator_logic.cpp b/firmware/controllers/system/timer/pwm_generator_logic.cpp index 68d5189990..c30f7c8326 100644 --- a/firmware/controllers/system/timer/pwm_generator_logic.cpp +++ b/firmware/controllers/system/timer/pwm_generator_logic.cpp @@ -67,13 +67,13 @@ void SimplePwm::setSimplePwmDutyCycle(float dutyCycle) { return; } if (cisnan(dutyCycle)) { - warning(CUSTOM_DUTY_INVALID, "spwd:dutyCycle %.2f", dutyCycle); + warning(CUSTOM_DUTY_INVALID, "%s spwd:dutyCycle %.2f", name, dutyCycle); return; } else if (dutyCycle < 0) { - warning(CUSTOM_DUTY_TOO_LOW, "spwd:dutyCycle %.2f", dutyCycle); + warning(CUSTOM_DUTY_TOO_LOW, "%s dutyCycle %.2f", name, dutyCycle); dutyCycle = 0; } else if (dutyCycle > 1) { - warning(CUSTOM_DUTY_TOO_HIGH, "spwd:dutyCycle %.2f", dutyCycle); + warning(CUSTOM_PWM_DUTY_TOO_HIGH, "%s duty %.2f", name, dutyCycle); dutyCycle = 1; } if (dutyCycle == 0.0f && stateChangeCallback != NULL) {