parent
057b067db0
commit
e08cdf0fb6
|
@ -405,8 +405,7 @@ void TriggerWaveform::setThirdTriggerSynchronizationGap(float syncRatio) {
|
|||
/**
|
||||
* External logger is needed because at this point our logger is not yet initialized
|
||||
*/
|
||||
void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperationMode, const TriggerConfiguration& triggerConfig) {
|
||||
const trigger_config_s &triggerType = triggerConfig.TriggerType;
|
||||
void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperationMode, const trigger_config_s &triggerType) {
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
efiAssertVoid(CUSTOM_ERR_6641, getCurrentRemainingStack() > EXPECTED_REMAINING_STACK, "init t");
|
||||
|
|
|
@ -60,7 +60,7 @@ class TriggerConfiguration;
|
|||
class TriggerWaveform {
|
||||
public:
|
||||
TriggerWaveform();
|
||||
void initializeTriggerWaveform(operation_mode_e triggerOperationMode, const TriggerConfiguration& triggerConfig);
|
||||
void initializeTriggerWaveform(operation_mode_e triggerOperationMode, const trigger_config_s &triggerType);
|
||||
void setShapeDefinitionError(bool value);
|
||||
|
||||
/**
|
||||
|
|
|
@ -1009,7 +1009,7 @@ void onConfigurationChangeTriggerCallback() {
|
|||
}
|
||||
|
||||
static void initVvtShape(TriggerWaveform& shape, const TriggerConfiguration& config, TriggerDecoderBase &initState) {
|
||||
shape.initializeTriggerWaveform(FOUR_STROKE_CAM_SENSOR, config);
|
||||
shape.initializeTriggerWaveform(FOUR_STROKE_CAM_SENSOR, config.TriggerType);
|
||||
shape.initializeSyncPoint(initState, config);
|
||||
}
|
||||
|
||||
|
@ -1058,7 +1058,7 @@ void TriggerCentral::updateWaveform() {
|
|||
vvtTriggerConfiguration[camIndex].update();
|
||||
}
|
||||
|
||||
triggerShape.initializeTriggerWaveform(lookupOperationMode(), primaryTriggerConfiguration);
|
||||
triggerShape.initializeTriggerWaveform(lookupOperationMode(), primaryTriggerConfiguration.TriggerType);
|
||||
|
||||
/**
|
||||
* this is only useful while troubleshooting a new trigger shape in the field
|
||||
|
|
|
@ -32,8 +32,9 @@ struct MockTriggerDecoder : public TriggerDecoderBase {
|
|||
};
|
||||
|
||||
static auto makeTriggerShape(operation_mode_e mode, const TriggerConfiguration& config) {
|
||||
// huh? do we return local method instance? how come it's not a SegmFault? is it not allocated on stack?!
|
||||
TriggerWaveform shape;
|
||||
shape.initializeTriggerWaveform(mode, config);
|
||||
shape.initializeTriggerWaveform(mode, config.TriggerType);
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue