better method name
This commit is contained in:
parent
7abd2d9b0a
commit
4c2ecf25eb
|
@ -334,7 +334,7 @@ void Engine::setConfig(persistent_config_s *config) {
|
|||
this->config = config;
|
||||
engineConfiguration = &config->engineConfiguration;
|
||||
memset(config, 0, sizeof(persistent_config_s));
|
||||
engineState.warmupAfrPid.init(&config->engineConfiguration.warmupAfrPid);
|
||||
engineState.warmupAfrPid.initPidClass(&config->engineConfiguration.warmupAfrPid);
|
||||
}
|
||||
|
||||
void Engine::printKnockState(void) {
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
#include "math.h"
|
||||
|
||||
Pid::Pid() {
|
||||
init(NULL);
|
||||
initPidClass(NULL);
|
||||
}
|
||||
|
||||
Pid::Pid(pid_s *pid) {
|
||||
init(pid);
|
||||
initPidClass(pid);
|
||||
}
|
||||
|
||||
void Pid::init(pid_s *pid) {
|
||||
void Pid::initPidClass(pid_s *pid) {
|
||||
this->pid = pid;
|
||||
resetCounter = 0;
|
||||
|
||||
|
@ -120,12 +120,12 @@ void Pid::postState(TunerStudioOutputChannels *tsOutputChannels, int pMult) {
|
|||
tsOutputChannels->debugFloatField3 = getPrevError();
|
||||
tsOutputChannels->debugFloatField4 = getI();
|
||||
tsOutputChannels->debugFloatField5 = getD();
|
||||
tsOutputChannels->debugFloatField6 = dTerm;
|
||||
// tsOutputChannels->debugFloatField6 = pid->minValue;
|
||||
tsOutputChannels->debugFloatField7 = pid->maxValue;
|
||||
tsOutputChannels->debugIntField1 = getP() * pMult;
|
||||
tsOutputChannels->debugIntField2 = getOffset();
|
||||
tsOutputChannels->debugIntField3 = resetCounter;
|
||||
tsOutputChannels->debugFloatField6 = dTerm;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class Pid {
|
|||
public:
|
||||
Pid();
|
||||
Pid(pid_s *pid);
|
||||
void init(pid_s *pid);
|
||||
void initPidClass(pid_s *pid);
|
||||
bool isSame(pid_s *pid);
|
||||
|
||||
float getValue(float target, float input);
|
||||
|
|
Loading…
Reference in New Issue