mockable throttle model

(cherry picked from commit 57263be2fe2886d7a3d4116764396b4b5c24dc49)
This commit is contained in:
Matthew Kennedy 2023-05-11 14:37:48 -07:00 committed by rusefillc
parent 0fb88270bc
commit 73ed1afd06
3 changed files with 5 additions and 2 deletions

View File

@ -37,7 +37,8 @@ struct IIdleController {
class IdleController : public IIdleController, public EngineModule, public idle_state_s { class IdleController : public IIdleController, public EngineModule, public idle_state_s {
public: public:
typedef IIdleController interface_t; // Mockable<> interface
using interface_t = IIdleController;
void init(); void init();

View File

@ -131,7 +131,7 @@ public:
#if EFI_HPFP && EFI_ENGINE_CONTROL #if EFI_HPFP && EFI_ENGINE_CONTROL
HpfpController, HpfpController,
#endif // EFI_HPFP && EFI_ENGINE_CONTROL #endif // EFI_HPFP && EFI_ENGINE_CONTROL
ThrottleModel, Mockable<ThrottleModel>,
#if EFI_ALTERNATOR_CONTROL #if EFI_ALTERNATOR_CONTROL
AlternatorController, AlternatorController,
#endif /* EFI_ALTERNATOR_CONTROL */ #endif /* EFI_ALTERNATOR_CONTROL */

View File

@ -4,6 +4,8 @@
struct ThrottleModelBase : public throttle_model_s, public EngineModule { struct ThrottleModelBase : public throttle_model_s, public EngineModule {
public: public:
using interface_t = ThrottleModelBase;
void onSlowCallback() override; void onSlowCallback() override;
float estimateThrottleFlow(float tip, float tps, float map, float iat); float estimateThrottleFlow(float tip, float tps, float map, float iat);