functional testing should not be that darn slow #1076
hopefully progress?
This commit is contained in:
parent
c55bf7a4c7
commit
73a4a92891
|
@ -61,6 +61,8 @@ FsioState::FsioState() {
|
|||
void Engine::resetEngineSnifferIfInTestMode() {
|
||||
#if EFI_ENGINE_SNIFFER
|
||||
if (isTestMode) {
|
||||
// TODO: what is the exact reasoning for the exact engine sniffer pause time I wonder
|
||||
waveChart.pauseEngineSnifferUntilNt = getTimeNowNt() + MS2NT(300);
|
||||
waveChart.reset();
|
||||
}
|
||||
#endif /* EFI_ENGINE_SNIFFER */
|
||||
|
@ -144,7 +146,7 @@ void Engine::periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
if (CONFIG(useTLE8888_cranking_hack) && ENGINE(rpmCalculator).isCranking(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||
efitick_t nowNt = getTimeNowNt();
|
||||
if (nowNt - tle8888CrankingResetTime > US2NT(MS2US(300))) {
|
||||
if (nowNt - tle8888CrankingResetTime > MS2NT(300)) {
|
||||
requestTLE8888initialization();
|
||||
// let's reset TLE8888 every 300ms while cranking since that's the best we can do to deal with undervoltage reset
|
||||
// PS: oh yes, it's a horrible design! Please suggest something better!
|
||||
|
|
|
@ -545,6 +545,7 @@ static void setTriggerType(int value) {
|
|||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
doPrintConfiguration();
|
||||
scheduleMsg(&logger, "Do you need to also invoke set operation_mode X?");
|
||||
engine->resetEngineSnifferIfInTestMode();
|
||||
}
|
||||
|
||||
static void setDebugMode(int value) {
|
||||
|
@ -625,6 +626,7 @@ static void setWholePhaseMapCmd(float value) {
|
|||
static void setWholeTimingMapCmd(float value) {
|
||||
scheduleMsg(&logger, "Setting whole timing advance map to %.2f", value);
|
||||
setWholeTimingMap(value);
|
||||
engine->resetEngineSnifferIfInTestMode();
|
||||
}
|
||||
|
||||
static void setWholeVeCmd(float value) {
|
||||
|
@ -633,6 +635,7 @@ static void setWholeVeCmd(float value) {
|
|||
scheduleMsg(&logger, "WARNING: setting VE map not in SD mode is pointless");
|
||||
}
|
||||
setMap(config->veTable, value);
|
||||
engine->resetEngineSnifferIfInTestMode();
|
||||
}
|
||||
|
||||
static void setWholeFuelMapCmd(float value) {
|
||||
|
@ -641,6 +644,7 @@ static void setWholeFuelMapCmd(float value) {
|
|||
scheduleMsg(&logger, "WARNING: setting fuel map in SD mode is pointless");
|
||||
}
|
||||
setWholeFuelMap(value PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
engine->resetEngineSnifferIfInTestMode();
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
|
|
|
@ -165,6 +165,9 @@ void WaveChart::publish() {
|
|||
* @brief Register an event for digital sniffer
|
||||
*/
|
||||
void WaveChart::addEvent3(const char *name, const char * msg) {
|
||||
if (getTimeNowNt() < pauseEngineSnifferUntilNt) {
|
||||
return;
|
||||
}
|
||||
#if EFI_TEXT_LOGGING
|
||||
if (!ENGINE(isEngineChartEnabled)) {
|
||||
return;
|
||||
|
|
|
@ -28,6 +28,8 @@ public:
|
|||
void publish();
|
||||
bool isFull() const;
|
||||
bool isStartedTooLongAgo() const;
|
||||
efitick_t pauseEngineSnifferUntilNt = 0;
|
||||
|
||||
private:
|
||||
Logging logging;
|
||||
char timeBuffer[_MAX_FILLER + 2];
|
||||
|
|
|
@ -122,7 +122,12 @@ public class TestingUtils {
|
|||
return EngineChartParser.unpackToMap(getNextWaveChart());
|
||||
}
|
||||
|
||||
static String getNextWaveChart() {
|
||||
static EngineChart nextChart1() {
|
||||
return EngineChartParser.unpackToMap(getNextWaveChart());
|
||||
}
|
||||
|
||||
|
||||
static String getNextWaveChart() {
|
||||
IoUtil.sendCommand(Fields.CMD_RESET_ENGINE_SNIFFER);
|
||||
String result = getEngineChart();
|
||||
FileLog.MAIN.logLine("current chart: " + result);
|
||||
|
|
Loading…
Reference in New Issue