auto-sync

This commit is contained in:
rusEfi 2016-01-24 16:01:28 -05:00
parent ec69d43a9f
commit ed2ebc9df2
4 changed files with 18 additions and 5 deletions

View File

@ -53,7 +53,7 @@ typedef struct {
* With all corrections. See also baseFuel
*/
float pulseWidthMs; // 64
float debugFloatField; // 68
float debugFloatField1; // 68
/**
* Yes, I do not really enjoy packing bits into integers but we simply have too many boolean flags and I cannot
* water 4 bytes per traffic - I want gauges to work as fast as possible
@ -109,9 +109,15 @@ typedef struct {
float chargeAirMass; // 180
float cltCorrection; // 184
float runningFuel; // 188
int debugIntField; // 192
int debugIntField1; // 192
float injectorLagMs; // 196
int unused3[19];
float debugFloatField2;
float debugFloatField3;
float debugFloatField4;
float debugFloatField5;
int debugIntField2;
int debugIntField3;
int unused3[12];
} TunerStudioOutputChannels;
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */

View File

@ -60,7 +60,9 @@ static msg_t AltCtrlThread(int param) {
}
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
tsOutputChannels.debugFloatField = currentAltDuty;
tsOutputChannels.debugFloatField1 = currentAltDuty;
tsOutputChannels.debugFloatField2 = altPid.getIntegration();
tsOutputChannels.debugFloatField3 = altPid.getPrevError();
#endif
alternatorControl.setSimplePwmDutyCycle(currentAltDuty / 100);

View File

@ -58,6 +58,10 @@ float Pid::getI(void) {
return pid->iFactor;
}
float Pid::getPrevError(void) {
return prevError;
}
float Pid::getIntegration(void) {
return iTerm;
}

View File

@ -19,8 +19,9 @@ public:
void reset(void);
float getP(void);
float getI(void);
float getIntegration(void);
float getD(void);
float getIntegration(void);
float getPrevError(void);
private:
pid_s *pid;
float minResult;