rusefi-1/firmware/controllers/trigger/trigger_simulator.h

30 lines
1000 B
C
Raw Normal View History

2015-09-23 18:02:33 -07:00
/*
* @file trigger_simulator.h
* @brief This class knows how to produce synthetic shaft signals based on triggerShape
*
* @date Sep 23, 2015
2017-01-03 03:05:22 -08:00
* @author Andrey Belomutskiy, (c) 2012-2017
2015-09-23 18:02:33 -07:00
*/
#ifndef CONTROLLERS_TRIGGER_TRIGGER_SIMULATOR_H_
#define CONTROLLERS_TRIGGER_TRIGGER_SIMULATOR_H_
#include "trigger_decoder.h"
class TriggerStimulatorHelper {
public:
TriggerStimulatorHelper();
uint32_t doFindTrigger(TriggerShape * shape,
2017-05-15 20:33:22 -07:00
trigger_config_s const*triggerConfig, TriggerState *state DECLARE_ENGINE_PARAMETER_SUFFIX);
2015-09-23 18:02:33 -07:00
2017-05-15 20:33:22 -07:00
void nextStep(TriggerState *state, TriggerShape * shape, int i, trigger_config_s const*triggerConfig DECLARE_ENGINE_PARAMETER_SUFFIX);
2015-09-23 18:02:33 -07:00
2017-03-04 06:07:10 -08:00
void assertSyncPositionAndSetDutyCycle(const uint32_t index, TriggerState *state, TriggerShape * shape,
2017-05-15 20:33:22 -07:00
trigger_config_s const*triggerConfig DECLARE_ENGINE_PARAMETER_SUFFIX);
2015-09-23 18:02:33 -07:00
};
2017-03-03 21:17:53 -08:00
bool isUsefulSignal(trigger_event_e signal, engine_configuration_s *engineConfiguration);
2015-09-23 18:02:33 -07:00
#endif /* CONTROLLERS_TRIGGER_TRIGGER_SIMULATOR_H_ */