canned tunes button should tell TS to refresh #7250

bugfix? copy-paste bad :(
only:uaefi
This commit is contained in:
rusefillc 2025-01-09 22:17:38 -05:00
parent 19bc7d381c
commit a638209c32
3 changed files with 8 additions and 2 deletions

View File

@ -194,7 +194,11 @@ void TunerStudio::sendErrorCode(TsChannelBase* tsChannel, uint8_t code, const ch
bool validateOffsetCount(size_t offset, size_t count, TsChannelBase* tsChannel);
bool wasPresetJustApplied() {
return !engine->configBurnTimer.hasElapsedSec(1);
return !engine->engineTypeChangeTimer.hasElapsedSec(1);
}
void onApplyPreset() {
engine->engineTypeChangeTimer.reset();
}
/**

View File

@ -54,6 +54,7 @@ void updateTunerStudioState();
void startTunerStudioConnectivity();
bool wasPresetJustApplied();
void onApplyPreset();
typedef struct {
uint16_t offset;

View File

@ -21,6 +21,7 @@
*/
#include "pch.h"
#include "tunerstudio.h"
static bool isRunningBench = false;
static OutputPin *outputOnTheBenchTest = nullptr;
@ -519,7 +520,7 @@ static void handleCommandX14(uint16_t index) {
extern bool rebootForPresetPending;
static void applyPreset(int index) {
engine->configBurnTimer.reset();
onApplyPreset();
setEngineType(index);
}