mirror of https://github.com/rusefi/rusefi.git
pain
This commit is contained in:
parent
9fdb962ec6
commit
f6c4f48c65
|
@ -76,6 +76,7 @@ public:
|
||||||
* [0, cylindersCount)
|
* [0, cylindersCount)
|
||||||
*/
|
*/
|
||||||
int cylinderIndex = 0;
|
int cylinderIndex = 0;
|
||||||
|
// previously known as cylinderNumber
|
||||||
int8_t coilIndex = 0;
|
int8_t coilIndex = 0;
|
||||||
char *name = nullptr;
|
char *name = nullptr;
|
||||||
IgnitionOutputPin *getOutputForLoggins();
|
IgnitionOutputPin *getOutputForLoggins();
|
||||||
|
|
|
@ -32,11 +32,11 @@ static void testNoOverdwell(const char* file, bool instantRpm) {
|
||||||
|
|
||||||
engine->onIgnitionEvent = [&](IgnitionEvent* event, bool state) {
|
engine->onIgnitionEvent = [&](IgnitionEvent* event, bool state) {
|
||||||
if (state) {
|
if (state) {
|
||||||
coilStartTimes[event->cylinderNumber] = getTimeNowNt();
|
coilStartTimes[event->coilIndex] = getTimeNowNt();
|
||||||
} else {
|
} else {
|
||||||
auto actualDwell = 1e-3 * NT2USF(getTimeNowNt() - coilStartTimes[event->cylinderNumber]);
|
auto actualDwell = 1e-3 * NT2USF(getTimeNowNt() - coilStartTimes[event->coilIndex]);
|
||||||
|
|
||||||
EXPECT_LT(actualDwell, 50) << "Overdwell on cylinder " << (int)event->cylinderNumber << " of " << actualDwell << " ms";
|
EXPECT_LT(actualDwell, 50) << "Overdwell on cylinder " << (int)event->coilIndex << " of " << actualDwell << " ms";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue