rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
trigger_emulator_algo.h
Go to the documentation of this file.
1/**
2 * @file trigger_emulator_algo.h
3 *
4 * @date Mar 3, 2014
5 * @author Andrey Belomutskiy, (c) 2012-2020
6 */
7
8#pragma once
9
10// 1 crank and CAMS_PER_BANK cam channels
11#define NUM_EMULATOR_CHANNELS (1 + CAMS_PER_BANK)
12
13class PwmConfig;
15
19void setTriggerEmulatorRPM(int value);
21
22// Start & stop trigger emulation
23void enableTriggerStimulator(bool incGlobalConfiguration = true);
26
28public:
30 void handleEmulatorCallback(int channel, const MultiChannelStateSequence& mcss, int stateIndex);
31};
32
33int getPreviousIndex(const int currentIndex, const int size);
34bool needEvent(const int currentIndex, const MultiChannelStateSequence& mcss, int channelIndex);
35
uint16_t channel
Definition adc_inputs.h:104
Multi-channel software PWM output configuration.
void handleEmulatorCallback(int channel, const MultiChannelStateSequence &mcss, int stateIndex)
composite packet size
void enableTriggerStimulator(bool incGlobalConfiguration=true)
void disableTriggerStimulator()
void startTriggerEmulatorPins()
void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration)
void initTriggerEmulator()
void stopTriggerEmulatorPins()
void enableExternalTriggerStimulator()
int getPreviousIndex(const int currentIndex, const int size)
bool needEvent(const int currentIndex, const MultiChannelStateSequence &mcss, int channelIndex)
void setTriggerEmulatorRPM(int value)