auto-sync
This commit is contained in:
parent
77244079c1
commit
d37729b3b8
|
@ -24,13 +24,13 @@ EXTERN_ENGINE
|
|||
static AccelEnrichmemnt instance;
|
||||
|
||||
void AccelEnrichmemnt::updateDiffEnrichment(engine_configuration_s *engineConfiguration, float engineLoad) {
|
||||
for (int i = 3; i == 1; i--)
|
||||
array[i] = array[i - 1];
|
||||
|
||||
array[0] = engineLoad;
|
||||
|
||||
diffEnrichment = ((3 * (array[0] - array[1]) + (array[2] - array[3])) / 4)
|
||||
* (engineConfiguration->diffLoadEnrichmentCoef);
|
||||
// for (int i = 3; i == 1; i--)
|
||||
// array[i] = array[i - 1];
|
||||
//
|
||||
// array[0] = engineLoad;
|
||||
//
|
||||
// diffEnrichment = ((3 * (array[0] - array[1]) + (array[2] - array[3])) / 4)
|
||||
// * (engineConfiguration->diffLoadEnrichmentCoef);
|
||||
}
|
||||
|
||||
//float AccelEnrichmemnt::getDiffEnrichment() {
|
||||
|
@ -69,8 +69,9 @@ void AccelEnrichmemnt::onEngineCycle(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
AccelEnrichmemnt::AccelEnrichmemnt() {
|
||||
reset();
|
||||
for (int i = 0; i < MAX_ACCEL_ARRAY_SIZE; i++)
|
||||
array[i] = 0;
|
||||
cb.setSize(4);
|
||||
// for (int i = 0; i < MAX_ACCEL_ARRAY_SIZE; i++)
|
||||
// array[i] = 0;
|
||||
diffEnrichment = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
#define ACC_ENRICHMENT_H_
|
||||
|
||||
#include "engine_configuration.h"
|
||||
#include "cyclic_buffer.h"
|
||||
|
||||
#define MAX_ACCEL_ARRAY_SIZE 64
|
||||
//#define MAX_ACCEL_ARRAY_SIZE 64
|
||||
|
||||
class AccelEnrichmemnt {
|
||||
public:
|
||||
|
@ -30,13 +31,13 @@ public:
|
|||
float delta;
|
||||
|
||||
private:
|
||||
float array[MAX_ACCEL_ARRAY_SIZE];
|
||||
// float array[MAX_ACCEL_ARRAY_SIZE];
|
||||
float diffEnrichment;
|
||||
cyclic_buffer cb;
|
||||
};
|
||||
|
||||
void initDiffEnrichment(void);
|
||||
float getAccelEnrichment(void);
|
||||
|
||||
|
||||
#endif /* ACC_ENRICHMENT_H_ */
|
||||
|
||||
|
|
Loading…
Reference in New Issue