trigger gap logging: it's a mess :(

This commit is contained in:
rusefi 2022-08-21 12:38:29 -04:00
parent 2f882b1452
commit ea7597e0d6
3 changed files with 3 additions and 1 deletions

View File

@ -104,6 +104,7 @@ PrimaryTriggerDecoder::PrimaryTriggerDecoder(const char* name)
#if ! EFI_PROD_CODE
bool printTriggerDebug = false;
bool printTriggerTrace = false;
// todo: migrate to triggerSyncGapRatio or triggerActualSyncGapRatio?
float actualSynchGap;
#endif /* ! EFI_PROD_CODE */

View File

@ -3,7 +3,7 @@ struct_no_prefix trigger_state_s
float autoscale vvtSyncGapRatio;;"", 1, 0, -10000, 10000, 3
float autoscale vvtCurrentPosition;;"", 1, 0, -10000, 10000, 3
float autoscale triggerSyncGapRatio;@@GAUGE_NAME_TRG_GAP@@;"", 1, 0, -10000, 10000, 3
float triggerActualSyncGapRatio;
float triggerActualSyncGapRatio;trigger: unused field?
uint8_t triggerStateIndex
uint8_t vvtCounter

View File

@ -227,6 +227,7 @@ TEST(misc, testFordAspire) {
static void testTriggerDecoder2(const char *msg, engine_type_e type, int synchPointIndex, float channel1duty, float channel2duty, float expectedGapRatio = NAN) {
printf("====================================================================================== testTriggerDecoder2 msg=%s\r\n", msg);
actualSynchGap = 0; // global variables are bad, let's at least reset state
// Some configs use aux valves, which requires this sensor
std::unordered_map<SensorType, float> sensorVals = {{SensorType::DriverThrottleIntent, 0}};
EngineTestHelper eth(type, sensorVals);