refactoring: better field name
This commit is contained in:
parent
20460239c3
commit
b5c2b70e23
|
@ -390,7 +390,7 @@ angle_t PrimaryTriggerDecoder::syncEnginePhase(int divider, int remainder, angle
|
|||
m_hasSynchronizedPhase = true;
|
||||
|
||||
if (totalShift > 0) {
|
||||
vvtSyncCounter++;
|
||||
camResyncCounter++;
|
||||
}
|
||||
|
||||
return totalShift;
|
||||
|
|
|
@ -7,6 +7,6 @@ struct_no_prefix trigger_state_s
|
|||
|
||||
uint8_t triggerStateIndex
|
||||
uint8_t vvtCounter
|
||||
uint8_t vvtSyncCounter
|
||||
uint8_t camResyncCounter
|
||||
uint8_t vvtStateIndex
|
||||
end_struct
|
||||
|
|
|
@ -38,7 +38,7 @@ struct trigger_state_s {
|
|||
/**
|
||||
* offset 22
|
||||
*/
|
||||
uint8_t vvtSyncCounter = (uint8_t)0;
|
||||
uint8_t camResyncCounter = (uint8_t)0;
|
||||
/**
|
||||
* offset 23
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,7 @@ TEST(trigger, map_cam_by_magic_point) {
|
|||
ASSERT_EQ(150, Sensor::getOrZero(SensorType::Rpm)) << "RPM";
|
||||
|
||||
ASSERT_EQ(1, engine->triggerCentral.mapVvt_map_peak);
|
||||
ASSERT_EQ(0, engine->triggerCentral.triggerState.vvtSyncCounter);
|
||||
ASSERT_EQ(0, engine->triggerCentral.triggerState.camResyncCounter);
|
||||
|
||||
// Nothing should have been scheduled yet
|
||||
ASSERT_EQ(1, engine->executor.size());
|
||||
|
@ -36,7 +36,7 @@ TEST(trigger, map_cam_by_magic_point) {
|
|||
eth.smartFireTriggerEvents2(/*count*/4, /*delayMs*/200);
|
||||
|
||||
ASSERT_EQ(2, engine->triggerCentral.mapVvt_map_peak);
|
||||
ASSERT_EQ(1, engine->triggerCentral.triggerState.vvtSyncCounter);
|
||||
ASSERT_EQ(1, engine->triggerCentral.triggerState.camResyncCounter);
|
||||
ASSERT_EQ(10, engine->triggerCentral.mapVvt_MAP_AT_CYCLE_COUNT);
|
||||
|
||||
ASSERT_EQ(ClearReason::None, eth.engine.limpManager.allowIgnition().reason);
|
||||
|
|
|
@ -24,7 +24,7 @@ TEST(realCrankingNB2, normalCranking) {
|
|||
|
||||
// Check the number of times VVT information was used to adjust crank phase
|
||||
// This should happen exactly once: once we sync, we shouldn't lose it.
|
||||
EXPECT_EQ(engine->triggerCentral.triggerState.vvtSyncCounter, 2);
|
||||
EXPECT_EQ(engine->triggerCentral.triggerState.camResyncCounter, 2);
|
||||
|
||||
ASSERT_EQ(942, round(Sensor::getOrZero(SensorType::Rpm)));
|
||||
|
||||
|
|
Loading…
Reference in New Issue