From 9d004635e40fa0568d3efbbdc8b872072738a422 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 8 Jul 2019 03:35:41 -0400 Subject: [PATCH] More than one aux pid #866 renaming this class since we will probably have two different implementations for two different cases --- firmware/console/status_loop.cpp | 2 +- firmware/controllers/actuators/alternator_controller.cpp | 2 +- firmware/controllers/actuators/aux_pid.cpp | 2 +- firmware/controllers/actuators/electronic_throttle.cpp | 2 +- firmware/controllers/actuators/idle_thread.cpp | 2 +- firmware/controllers/actuators/malfunction_indicator.cpp | 2 +- firmware/controllers/injector_central.cpp | 2 +- .../{periodic_controller.h => periodic_thread_controller.h} | 5 +++-- firmware/hw_layer/microsecond_timer.cpp | 2 +- firmware/hw_layer/sensors/accelerometer.cpp | 2 +- 10 files changed, 12 insertions(+), 11 deletions(-) rename firmware/controllers/system/{periodic_controller.h => periodic_thread_controller.h} (93%) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index aa6fbc1a46..e8f28dd856 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -57,7 +57,7 @@ #include "lcd_controller.h" #include "settings.h" #include "can_hw.h" -#include "periodic_controller.h" +#include "periodic_thread_controller.h" #include "cdm_ion_sense.h" extern afr_Map3D_t afrMap; diff --git a/firmware/controllers/actuators/alternator_controller.cpp b/firmware/controllers/actuators/alternator_controller.cpp index 1fe7f36a5b..355539afd9 100644 --- a/firmware/controllers/actuators/alternator_controller.cpp +++ b/firmware/controllers/actuators/alternator_controller.cpp @@ -15,7 +15,7 @@ #include "voltage.h" #include "pid.h" #include "local_version_holder.h" -#include "periodic_controller.h" +#include "periodic_thread_controller.h" #include "pwm_generator.h" #include "pin_repository.h" diff --git a/firmware/controllers/actuators/aux_pid.cpp b/firmware/controllers/actuators/aux_pid.cpp index fa048c6454..c7bf2d71f4 100644 --- a/firmware/controllers/actuators/aux_pid.cpp +++ b/firmware/controllers/actuators/aux_pid.cpp @@ -17,7 +17,7 @@ #include "fsio_impl.h" #include "engine_math.h" #include "pin_repository.h" -#include "periodic_controller.h" +#include "periodic_thread_controller.h" #if defined(HAS_OS_ACCESS) #error "Unexpected OS ACCESS HERE" diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index 41d06c2e9a..e244878143 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -77,7 +77,7 @@ #include "pwm_generator_logic.h" #include "pid.h" #include "engine_controller.h" -#include "periodic_controller.h" +#include "periodic_thread_controller.h" #include "pin_repository.h" #include "pwm_generator.h" #include "dc_motor.h" diff --git a/firmware/controllers/actuators/idle_thread.cpp b/firmware/controllers/actuators/idle_thread.cpp index 57d7ea4c30..ea8610f9dd 100644 --- a/firmware/controllers/actuators/idle_thread.cpp +++ b/firmware/controllers/actuators/idle_thread.cpp @@ -33,7 +33,7 @@ #include "idle_thread.h" #include "pin_repository.h" #include "engine.h" -#include "periodic_controller.h" +#include "periodic_thread_controller.h" #include "stepper.h" #include "allsensors.h" diff --git a/firmware/controllers/actuators/malfunction_indicator.cpp b/firmware/controllers/actuators/malfunction_indicator.cpp index eefa039747..12f2572c3f 100644 --- a/firmware/controllers/actuators/malfunction_indicator.cpp +++ b/firmware/controllers/actuators/malfunction_indicator.cpp @@ -32,7 +32,7 @@ #include "malfunction_central.h" #include "malfunction_indicator.h" #include "efi_gpio.h" -#include "periodic_controller.h" +#include "periodic_thread_controller.h" #define TEST_MIL_CODE FALSE diff --git a/firmware/controllers/injector_central.cpp b/firmware/controllers/injector_central.cpp index af3d2bc6d3..ff51d6745d 100644 --- a/firmware/controllers/injector_central.cpp +++ b/firmware/controllers/injector_central.cpp @@ -35,7 +35,7 @@ #include "efi_gpio.h" #include "settings.h" #include "idle_thread.h" -#include "periodic_controller.h" +#include "periodic_thread_controller.h" #include "tps.h" #if EFI_PROD_CODE #include "rusefi.h" diff --git a/firmware/controllers/system/periodic_controller.h b/firmware/controllers/system/periodic_thread_controller.h similarity index 93% rename from firmware/controllers/system/periodic_controller.h rename to firmware/controllers/system/periodic_thread_controller.h index 885cb987ad..33c27cc885 100644 --- a/firmware/controllers/system/periodic_controller.h +++ b/firmware/controllers/system/periodic_thread_controller.h @@ -1,5 +1,5 @@ /** - * @file periodic_controller.h + * @file periodic_thread_controller.h * * @date Jan 5, 2019 * @author Matthew Kennedy, (c) 2019 @@ -18,7 +18,8 @@ * inherit this class, and perform your period update in PeriodicTask. Any one-time * setup work can be performed in OnStarted(). * - * This class effectively implements this funtionality: + * Each instance has one underlying thread meaning that task could be blocking/synchronous. + * This class effectively implements this functionality: * * void thread() * { diff --git a/firmware/hw_layer/microsecond_timer.cpp b/firmware/hw_layer/microsecond_timer.cpp index 3d1e6374c4..69bc32e255 100644 --- a/firmware/hw_layer/microsecond_timer.cpp +++ b/firmware/hw_layer/microsecond_timer.cpp @@ -21,7 +21,7 @@ #if EFI_PROD_CODE && HAL_USE_GPT -#include "periodic_controller.h" +#include "periodic_thread_controller.h" /** * Maximum duration of complete timer callback, all pending events together diff --git a/firmware/hw_layer/sensors/accelerometer.cpp b/firmware/hw_layer/sensors/accelerometer.cpp index 8352bee7d4..81e55a508d 100644 --- a/firmware/hw_layer/sensors/accelerometer.cpp +++ b/firmware/hw_layer/sensors/accelerometer.cpp @@ -24,7 +24,7 @@ EXTERN_ENGINE; #if EFI_MEMS #include "mpu_util.h" #include "lis302dl.h" -#include "periodic_controller.h" +#include "periodic_thread_controller.h" static SPIDriver *driver;