2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file main_trigger_callback.h
|
|
|
|
* @brief Main logic header
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @date Feb 9, 2013
|
2017-01-03 03:05:22 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2017
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MAIN_LOOP_H_
|
|
|
|
#define MAIN_LOOP_H_
|
|
|
|
|
2018-09-16 19:00:14 -07:00
|
|
|
#include "engine.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
#include "event_registry.h"
|
|
|
|
|
2017-05-25 19:28:04 -07:00
|
|
|
void initMainEventListener(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
2017-05-15 20:33:22 -07:00
|
|
|
void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECLARE_ENGINE_PARAMETER_SUFFIX);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
int isIgnitionTimingError(void);
|
2018-03-04 20:53:48 -08:00
|
|
|
void startPrimeInjectionPulse(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
void showMainHistogram(void);
|
|
|
|
|
2018-03-04 19:32:02 -08:00
|
|
|
void startSimultaniousInjection(Engine *engine);
|
2018-03-04 19:45:20 -08:00
|
|
|
void endSimultaniousInjection(InjectionEvent *event);
|
2017-05-24 04:57:58 -07:00
|
|
|
void seTurnPinHigh(InjectionSignalPair *pair);
|
|
|
|
void seTurnPinLow(InjectionSignalPair *pair);
|
2016-09-26 18:03:18 -07:00
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
float getFuel(int rpm, float key);
|
2017-12-23 11:15:35 -08:00
|
|
|
|
|
|
|
// reset injection switch counter if the engine started spinning
|
|
|
|
void updatePrimeInjectionPulseState(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
#endif /* MAIN_LOOP_H_ */
|