Trying latest gcc 9 #1001
This commit is contained in:
parent
252b63646a
commit
42cd78fbd5
|
@ -31,14 +31,14 @@
|
|||
|
||||
persistent_config_container_s persistentState CCM_OPTIONAL;
|
||||
|
||||
const persistent_config_s *config = &persistentState.persistentConfiguration;
|
||||
persistent_config_s *config = &persistentState.persistentConfiguration;
|
||||
|
||||
/**
|
||||
* todo: it really looks like these fields should become 'static', i.e. private
|
||||
* the whole 'extern ...' pattern is less then perfect, I guess the 'God object' Engine
|
||||
* would be a smaller evil. Whatever is needed should be passed into methods/modules/files as an explicit parameter.
|
||||
*/
|
||||
const engine_configuration_s *engineConfiguration = &persistentState.persistentConfiguration.engineConfiguration;
|
||||
const board_configuration_s *boardConfiguration = &persistentState.persistentConfiguration.engineConfiguration.bc;
|
||||
engine_configuration_s *engineConfiguration = &persistentState.persistentConfiguration.engineConfiguration;
|
||||
board_configuration_s *boardConfiguration = &persistentState.persistentConfiguration.engineConfiguration.bc;
|
||||
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
|
|
@ -207,7 +207,7 @@ void hwHandleShaftSignal(trigger_event_e signal) {
|
|||
// for effective noise filtering, we need both signal edges,
|
||||
// so we pass them to handleShaftSignal() and defer this test
|
||||
if (!CONFIGB(useNoiselessTriggerDecoder)) {
|
||||
if (!isUsefulSignal(signal, engineConfiguration)) {
|
||||
if (!isUsefulSignal(signal PASS_ENGINE_PARAMETER_SUFFIX)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PAR
|
|||
return;
|
||||
}
|
||||
// moved here from hwHandleShaftSignal()
|
||||
if (!isUsefulSignal(signal, engineConfiguration)) {
|
||||
if (!isUsefulSignal(signal PASS_ENGINE_PARAMETER_SUFFIX)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ TriggerStimulatorHelper::TriggerStimulatorHelper() {
|
|||
static const bool isRisingEdge[6] = { false, true, false, true, false, true };
|
||||
|
||||
// todo: should this method be invoked somewhere deeper? at the moment we have too many usages too high
|
||||
bool isUsefulSignal(trigger_event_e signal, engine_configuration_s *engineConfiguration) {
|
||||
bool isUsefulSignal(trigger_event_e signal DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
return !engineConfiguration->useOnlyRisingEdgeForTrigger || isRisingEdge[(int) signal];
|
||||
}
|
||||
|
||||
|
@ -65,21 +65,21 @@ void TriggerStimulatorHelper::feedSimulatedEvent(TriggerState *state, TriggerSha
|
|||
if (needEvent(stateIndex, size, multiWave, 0)) {
|
||||
pin_state_t currentValue = multiWave->getChannelState(/*phaseIndex*/0, stateIndex);
|
||||
trigger_event_e s = currentValue ? SHAFT_PRIMARY_RISING : SHAFT_PRIMARY_FALLING;
|
||||
if (isUsefulSignal(s, engineConfiguration))
|
||||
if (isUsefulSignal(s PASS_ENGINE_PARAMETER_SUFFIX))
|
||||
state->decodeTriggerEvent(s, time PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
|
||||
if (needEvent(stateIndex, size, multiWave, 1)) {
|
||||
pin_state_t currentValue = multiWave->getChannelState(/*phaseIndex*/1, stateIndex);
|
||||
trigger_event_e s = currentValue ? SHAFT_SECONDARY_RISING : SHAFT_SECONDARY_FALLING;
|
||||
if (isUsefulSignal(s, engineConfiguration))
|
||||
if (isUsefulSignal(s PASS_ENGINE_PARAMETER_SUFFIX))
|
||||
state->decodeTriggerEvent(s, time PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
|
||||
if (needEvent(stateIndex, size, multiWave, 2)) {
|
||||
pin_state_t currentValue = multiWave->getChannelState(/*phaseIndex*/2, stateIndex);
|
||||
trigger_event_e s = currentValue ? SHAFT_3RD_RISING : SHAFT_3RD_FALLING;
|
||||
if (isUsefulSignal(s, engineConfiguration))
|
||||
if (isUsefulSignal(s PASS_ENGINE_PARAMETER_SUFFIX))
|
||||
state->decodeTriggerEvent(s, time PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,6 @@ private:
|
|||
void feedSimulatedEvent(TriggerState *state, TriggerShape * shape, int i DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
};
|
||||
|
||||
bool isUsefulSignal(trigger_event_e signal, engine_configuration_s *engineConfiguration);
|
||||
bool isUsefulSignal(trigger_event_e signal DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
#endif /* CONTROLLERS_TRIGGER_TRIGGER_SIMULATOR_H_ */
|
||||
|
|
Loading…
Reference in New Issue