validateConfigOnStartUpOrBurn

This commit is contained in:
rusefillc 2024-06-09 11:42:06 -04:00 committed by Andrey
parent b243b30b94
commit 41563266a6
5 changed files with 5 additions and 5 deletions

View File

@ -358,6 +358,7 @@ static void handleBurnCommand(TsChannelBase* tsChannel) {
tsState.burnCommandCounter++;
efiPrintf("got B (Burn)");
validateConfigOnStartUpOrBurn();
// Skip the burn if a preset was just loaded - we don't want to overwrite it
if (!rebootForPresetPending) {

View File

@ -534,8 +534,7 @@ PUBLIC_API_WEAK bool validateBoardConfig() {
}
// Returns false if there's an obvious problem with the loaded configuration
// todo: shall we also invoke this from 'burn'?
bool validateConfigOnStartUp() {
bool validateConfigOnStartUpOrBurn() {
if (!validateBoardConfig()) {
return false;
}

View File

@ -11,7 +11,7 @@
#define FAST_CALLBACK_PERIOD_MS 5
#define SLOW_CALLBACK_PERIOD_MS 50
bool validateConfigOnStartUp();
bool validateConfigOnStartUpOrBurn();
char * getPinNameByAdcChannel(const char *msg, adc_channel_e hwChannel, char *buffer);
void initPeriodicEvents();
// see also applyNewHardwareSettings

View File

@ -263,7 +263,7 @@ void runRusEfiWithConfig() {
#endif
// Config could be completely bogus - don't start anything else!
if (validateConfigOnStartUp()) {
if (validateConfigOnStartUpOrBurn()) {
/**
* Now let's initialize actual engine control logic
* todo: should we initialize some? most? controllers before hardware?

View File

@ -110,7 +110,7 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb
resetConfigurationExt(configurationCallback, engineType);
validateConfigOnStartUp();
validateConfigOnStartUpOrBurn();
enginePins.startPins();