auto-sync
This commit is contained in:
parent
972af6a9f2
commit
a87a7e0fff
|
@ -16,9 +16,9 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
//#if EFI_PROD_CODE
|
||||||
static THD_WORKING_AREA(aeThreadStack, UTILITY_THREAD_STACK_SIZE);
|
//static THD_WORKING_AREA(aeThreadStack, UTILITY_THREAD_STACK_SIZE);
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
static AccelEnrichmemnt instance;
|
static AccelEnrichmemnt instance;
|
||||||
|
|
||||||
|
@ -36,6 +36,10 @@ float AccelEnrichmemnt::getDiffEnrichment() {
|
||||||
return diffEnrichment;
|
return diffEnrichment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AccelEnrichmemnt::onEngineCycle(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
AccelEnrichmemnt::AccelEnrichmemnt() {
|
AccelEnrichmemnt::AccelEnrichmemnt() {
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
engineLoadD[i] = 0;
|
engineLoadD[i] = 0;
|
||||||
|
@ -46,22 +50,22 @@ float getAccelEnrichment(void) {
|
||||||
return instance.getDiffEnrichment();
|
return instance.getDiffEnrichment();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
//#if EFI_PROD_CODE
|
||||||
|
//
|
||||||
|
//static msg_t DiffEnrichmentThread(int param) {
|
||||||
|
// chRegSetThreadName("Diff Enrichment");
|
||||||
|
// while (TRUE) {
|
||||||
|
// instance.updateDiffEnrichment(engineConfiguration, getEngineLoadT(PASS_ENGINE_PARAMETER));
|
||||||
|
// chThdSleepMilliseconds(100);
|
||||||
|
// }
|
||||||
|
//#if defined __GNUC__
|
||||||
|
// return -1;
|
||||||
|
//#endif
|
||||||
|
//}
|
||||||
|
|
||||||
static msg_t DiffEnrichmentThread(int param) {
|
//void initDiffEnrichment(void) {
|
||||||
chRegSetThreadName("Diff Enrichment");
|
// chThdCreateStatic(aeThreadStack, sizeof(aeThreadStack), LOWPRIO, (tfunc_t) DiffEnrichmentThread, NULL);
|
||||||
while (TRUE) {
|
//}
|
||||||
instance.updateDiffEnrichment(engineConfiguration, getEngineLoadT(PASS_ENGINE_PARAMETER));
|
|
||||||
chThdSleepMilliseconds(100);
|
|
||||||
}
|
|
||||||
#if defined __GNUC__
|
|
||||||
return -1;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void initDiffEnrichment(void) {
|
//#endif
|
||||||
chThdCreateStatic(aeThreadStack, sizeof(aeThreadStack), LOWPRIO, (tfunc_t) DiffEnrichmentThread, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,9 @@ public:
|
||||||
void updateDiffEnrichment(engine_configuration_s *engineConfiguration,
|
void updateDiffEnrichment(engine_configuration_s *engineConfiguration,
|
||||||
float engineLoad);
|
float engineLoad);
|
||||||
float getDiffEnrichment(void);
|
float getDiffEnrichment(void);
|
||||||
|
|
||||||
|
void onEngineCycle(DECLARE_ENGINE_PARAMETER_F);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float engineLoadD[4];
|
float engineLoadD[4];
|
||||||
float diffEnrichment;
|
float diffEnrichment;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "trigger_structure.h"
|
#include "trigger_structure.h"
|
||||||
#include "table_helper.h"
|
#include "table_helper.h"
|
||||||
#include "listener_array.h"
|
#include "listener_array.h"
|
||||||
|
#include "accel_enrichment.h"
|
||||||
|
|
||||||
#define OUTPUT_SIGNAL_MAX_SIZE 45
|
#define OUTPUT_SIGNAL_MAX_SIZE 45
|
||||||
|
|
||||||
|
@ -131,6 +132,8 @@ public:
|
||||||
Thermistor iat;
|
Thermistor iat;
|
||||||
Thermistor clt;
|
Thermistor clt;
|
||||||
|
|
||||||
|
AccelEnrichmemnt accelEnrichment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fuel injection duration for current engine cycle
|
* Fuel injection duration for current engine cycle
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue