only:boardAfterTuneDefaults this is all a mess
This commit is contained in:
parent
8052d73e3a
commit
b34b5aacfc
|
@ -119,7 +119,7 @@ void onBurnRequest() {
|
|||
* this hook is about https://github.com/rusefi/rusefi/wiki/Custom-Firmware and https://github.com/rusefi/rusefi/wiki/Canned-Tune-Process
|
||||
* todo: why two hooks? is one already dead?
|
||||
*/
|
||||
PUBLIC_API_WEAK void boardTuneDefaults() { }
|
||||
PUBLIC_API_WEAK void boardBeforeTuneDefaults() { }
|
||||
|
||||
// Weak link a stub so that every board doesn't have to implement this function
|
||||
PUBLIC_API_WEAK void boardOnConfigurationChange(engine_configuration_s* /*previousConfiguration*/) { }
|
||||
|
@ -678,7 +678,7 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
|
|||
/**
|
||||
* custom board engine defaults. Yes, this overlaps with (older) engine_type_e approach.
|
||||
*/
|
||||
boardTuneDefaults();
|
||||
boardBeforeTuneDefaults();
|
||||
|
||||
// set initial pin groups
|
||||
setDefaultBasePins();
|
||||
|
|
|
@ -53,10 +53,12 @@ static_assert(libPROTEUS_STIM_QC == (int)engine_type_e::PROTEUS_STIM_QC);
|
|||
static_assert(libHELLEN_2CHAN_STIM_QC == (int)engine_type_e::HELLEN_2CHAN_STIM_QC);
|
||||
static_assert(libHELLEN_4CHAN_STIM_QC == (int)engine_type_e::HELLEN_4CHAN_STIM_QC);
|
||||
|
||||
PUBLIC_API_WEAK_SOMETHING_WEIRD void applyEngineTypeExt(engine_type_e engineType) {
|
||||
PUBLIC_API_WEAK_SOMETHING_WEIRD void applyUnknownEngineType(engine_type_e engineType) {
|
||||
firmwareError(ObdCode::CUSTOM_UNEXPECTED_ENGINE_TYPE, "Unexpected engine type: %d", (int)engineType);
|
||||
}
|
||||
|
||||
PUBLIC_API_WEAK void boardAfterTuneDefaults(engine_type_e engineType) { }
|
||||
|
||||
void applyEngineType(engine_type_e engineType) {
|
||||
/**
|
||||
* And override them with engine-specific defaults
|
||||
|
@ -417,8 +419,9 @@ void applyEngineType(engine_type_e engineType) {
|
|||
break;
|
||||
#endif //HW_SUBARU_EG33
|
||||
default:
|
||||
applyEngineTypeExt(engineType);
|
||||
applyUnknownEngineType(engineType);
|
||||
}
|
||||
boardAfterTuneDefaults(engineType);
|
||||
}
|
||||
|
||||
PUBLIC_API_WEAK_SOMETHING_WEIRD engine_type_e getLastEngineType() {
|
||||
|
|
Loading…
Reference in New Issue