rusEFI
The most advanced open source ECU
|
#include <state_sequence.h>
Public Member Functions | |
virtual float | getSwitchTime (int phaseIndex) const =0 |
virtual pin_state_t | getChannelState (int channelIndex, int phaseIndex) const =0 |
void | checkSwitchTimes (float scale) const |
expected< int > | findAngleMatch (float angle) const |
int | findInsertionAngle (float angle) const |
Data Fields | |
uint16_t | phaseCount = 0 |
uint16_t | waveCount = 0 |
This class represents multi-channel logical signals with shared time axis
This is a semi-abstract interface so that implementations can exist for either regularized patterns (60-2, etc) or completely arbitrary patterns stored in arrays.
Definition at line 52 of file state_sequence.h.
void MultiChannelStateSequence::checkSwitchTimes | ( | float | scale | ) | const |
Definition at line 12 of file state_sequence.cpp.
Referenced by copyPwmParameters(), and TriggerWaveform::initializeTriggerWaveform().
expected< int > MultiChannelStateSequence::findAngleMatch | ( | float | angle | ) | const |
Definition at line 43 of file state_sequence.cpp.
Referenced by TriggerWaveform::addEvent().
int MultiChannelStateSequence::findInsertionAngle | ( | float | angle | ) | const |
Definition at line 35 of file state_sequence.cpp.
Referenced by TriggerWaveform::addEvent().
|
pure virtual |
Implemented in MultiChannelStateSequenceWithData< max_phase >, MultiChannelStateSequenceWithData< 2 >, and MultiChannelStateSequenceWithData< PWM_PHASE_MAX_COUNT >.
Referenced by PwmConfig::applyPwmValue(), TriggerEmulatorHelper::handleEmulatorCallback(), and needEvent().
|
pure virtual |
values in the (0..1] range which refer to points within the period at at which pin state should be changed So, in the simplest case we turn pin off at 0.3 and turn it on at 1 - that would give us a 70% duty cycle PWM
Implemented in MultiChannelStateSequenceWithData< max_phase >, MultiChannelStateSequenceWithData< 2 >, and MultiChannelStateSequenceWithData< PWM_PHASE_MAX_COUNT >.
Referenced by checkSwitchTimes(), findAngleMatch(), and findInsertionAngle().
uint16_t MultiChannelStateSequence::phaseCount = 0 |
Definition at line 71 of file state_sequence.h.
Referenced by TriggerWaveform::addEvent(), checkSwitchTimes(), findAngleMatch(), findInsertionAngle(), TriggerWaveform::getAngle(), TriggerWaveform::getSize(), TriggerWaveform::initialize(), initialize60_2_2_Renault_F(), needEvent(), SimplePwm::SimplePwm(), PwmConfig::togglePwmState(), and PwmConfig::weComplexInit().
uint16_t MultiChannelStateSequence::waveCount = 0 |
Definition at line 72 of file state_sequence.h.
Referenced by MultiChannelStateSequenceWithData< max_phase >::getChannelState(), TriggerWaveform::initialize(), MultiChannelStateSequenceWithData< max_phase >::reset(), MultiChannelStateSequenceWithData< max_phase >::setChannelState(), SimplePwm::SimplePwm(), and PwmConfig::weComplexInit().