looks like initialState was dead #55

This commit is contained in:
Matthew Kennedy 2023-05-30 23:05:26 -07:00
parent 03d43126de
commit daaf50c2e4
3 changed files with 1 additions and 7 deletions

View File

@ -120,7 +120,6 @@ void initializeMazdaMiataVVtTestShape(TriggerWaveform *s) {
void configureMazdaProtegeSOHC(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CAM_SENSOR, SyncEdge::Both);
// s->initialState[0] = 1;
// float w = 720 / 4 * 0.215;
float a = 5;

View File

@ -69,7 +69,6 @@ void TriggerWaveform::initialize(operation_mode_e operationMode, SyncEdge syncEd
this->operationMode = operationMode;
this->syncEdge = syncEdge;
triggerShapeSynchPointIndex = 0;
memset(initialState, 0, sizeof(initialState));
memset(expectedEventCount, 0, sizeof(expectedEventCount));
wave.reset();
wave.waveCount = TRIGGER_INPUT_PIN_COUNT;
@ -266,7 +265,7 @@ void TriggerWaveform::addEvent(angle_t angle, bool state, TriggerWheel const cha
if (wave.phaseCount == 0) {
wave.phaseCount = 1;
for (int i = 0; i < PWM_PHASE_MAX_WAVE_PER_PWM; i++) {
wave.setChannelState(i, /* switchIndex */ 0, /* value */ initialState[i] == TriggerValue::RISE);
wave.setChannelState(i, /* switchIndex */ 0, /* value */ false);
}
isRiseEvent[0] = state;

View File

@ -171,10 +171,6 @@ public:
*/
MultiChannelStateSequenceWithData<PWM_PHASE_MAX_COUNT> wave;
// todo: add a runtime validation which would verify that this field was set properly
// todo: maybe even automate this flag calculation?
TriggerValue initialState[PWM_PHASE_MAX_WAVE_PER_PWM];
bool isRiseEvent[PWM_PHASE_MAX_COUNT];
/**