2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file idle_thread.h
|
|
|
|
* @brief Idle Valve Control thread
|
|
|
|
*
|
|
|
|
* @date May 23, 2013
|
2020-01-07 21:02:40 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
2019-10-18 16:45:32 -07:00
|
|
|
#pragma once
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
#include "engine.h"
|
2019-09-19 19:56:54 -07:00
|
|
|
#include "periodic_task.h"
|
|
|
|
|
|
|
|
class IdleController : public PeriodicTimerController {
|
|
|
|
public:
|
2019-09-21 21:16:46 -07:00
|
|
|
DECLARE_ENGINE_PTR;
|
2019-09-19 19:56:54 -07:00
|
|
|
|
|
|
|
int getPeriodMs() override;
|
|
|
|
void PeriodicTask() override;
|
|
|
|
};
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2015-10-18 11:01:37 -07:00
|
|
|
percent_t getIdlePosition(void);
|
2017-01-06 14:01:28 -08:00
|
|
|
void setIdleValvePosition(int positionPercent);
|
2019-08-28 21:10:47 -07:00
|
|
|
void startIdleThread(Logging*sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
2019-08-29 20:50:20 -07:00
|
|
|
void setDefaultIdleParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
2016-12-26 18:04:16 -08:00
|
|
|
void startIdleBench(void);
|
2017-01-06 13:03:41 -08:00
|
|
|
void setIdleDT(int value);
|
2017-05-22 20:25:34 -07:00
|
|
|
void setIdleOffset(float value);
|
2017-01-06 13:03:41 -08:00
|
|
|
void setIdlePFactor(float value);
|
|
|
|
void setIdleIFactor(float value);
|
|
|
|
void setIdleDFactor(float value);
|
2017-05-16 17:52:52 -07:00
|
|
|
void setIdleMode(idle_mode_e value);
|
2017-01-06 14:01:28 -08:00
|
|
|
void setTargetIdleRpm(int value);
|
|
|
|
void setIdleDT(int value);
|
2019-10-18 16:45:32 -07:00
|
|
|
void stopIdleHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|
|
|
void initIdleHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|
|
|
bool isIdleHardwareRestartNeeded();
|
2017-05-28 10:44:26 -07:00
|
|
|
void onConfigurationChangeIdleCallback(engine_configuration_s *previousConfiguration);
|
2015-07-10 06:01:56 -07:00
|
|
|
|