auto-sync

This commit is contained in:
rusEfi 2016-07-23 15:05:04 -04:00
parent 7047fe83e1
commit 7ea8aa98e0
3 changed files with 12 additions and 3 deletions

View File

@ -977,6 +977,8 @@ static void setValue(const char *paramStr, const char *valueStr) {
#endif
} else if (strEqualCaseInsensitive(paramStr, "warningPeriod")) {
engineConfiguration->warningPeriod = valueI;
} else if (strEqualCaseInsensitive(paramStr, "engineSnifferRpmThreshold")) {
engineConfiguration->engineSnifferRpmThreshold = valueI;
} else if (strEqualCaseInsensitive(paramStr, "step1rpm")) {
engineConfiguration->step1rpm = valueI;
} else if (strEqualCaseInsensitive(paramStr, "step1timing")) {

View File

@ -255,6 +255,7 @@ void TriggerShape::addEvent2(angle_t angle, trigger_wheel_e const waveIndex, tri
addEvent(angle, waveIndex, stateParam);
}
// todo: probably replace all usages with 'addEvent2'?
void TriggerShape::addEvent(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const stateParam) {
efiAssertVoid(operationMode != OM_NONE, "operationMode not set");
@ -286,8 +287,7 @@ void TriggerShape::addEvent(angle_t angle, trigger_wheel_e const waveIndex, trig
*/
angle /= engineCycle;
#if EFI_PROD_CODE || defined(__DOXYGEN__)
// todo: PASS_ENGINE?
#if !EFI_UNIT_TEST || defined(__DOXYGEN__)
if (!engineConfiguration->useOnlyRisingEdgeForTrigger || stateParam == TV_RISE) {
expectedEventCount[waveIndex]++;
}

View File

@ -30,6 +30,10 @@
#include "engine_controller.h"
#include "map_averaging.h"
#define DEFAULT_SIM_RPM 1200
#define DEFAULT_ENGINE_TYPE FORD_ESCORT_GT
#define DEFAULT_SNIFFER_THR 2500
EXTERN_ENGINE;
extern engine_configuration2_s * engineConfiguration2;
@ -78,7 +82,7 @@ void rusEfiFunctionalTest(void) {
// todo: reduce code duplication with initEngineContoller
resetConfigurationExt(NULL, FORD_ESCORT_GT PASS_ENGINE_PARAMETER);
resetConfigurationExt(NULL, DEFAULT_ENGINE_TYPE PASS_ENGINE_PARAMETER);
prepareShapes(PASS_ENGINE_PARAMETER_F);
initAlgo(&sharedLogger, engineConfiguration);
@ -103,6 +107,9 @@ void rusEfiFunctionalTest(void) {
startStatusThreads(engine);
initPeriodicEvents(PASS_ENGINE_PARAMETER_F);
setTriggerEmulatorRPM(DEFAULT_SIM_RPM, engine);
engineConfiguration->engineSnifferRpmThreshold = DEFAULT_SNIFFER_THR;
}
void printPendingMessages(void) {