Merge branch 'master' of https://github.com/rusefi/rusefi
This commit is contained in:
commit
14e1b9fb81
|
@ -196,23 +196,27 @@ static void SetNextCompositeEntry(efitick_t timestamp) {
|
|||
return;
|
||||
}
|
||||
|
||||
composite_logger_s* entry = &buffer->buffer[buffer->nextIdx];
|
||||
size_t idx = buffer->nextIdx;
|
||||
auto nextIdx = idx + 1;
|
||||
buffer->nextIdx = nextIdx;
|
||||
|
||||
uint32_t nowUs = NT2US(timestamp);
|
||||
if (idx < efi::size(buffer->buffer)) {
|
||||
composite_logger_s* entry = &buffer->buffer[idx];
|
||||
|
||||
// TS uses big endian, grumble
|
||||
entry->timestamp = SWAP_UINT32(nowUs);
|
||||
entry->priLevel = currentTrigger1;
|
||||
entry->secLevel = currentTrigger2;
|
||||
entry->trigger = currentTdc;
|
||||
entry->sync = engine->triggerCentral.triggerState.getShaftSynchronized();
|
||||
entry->coil = currentCoilState;
|
||||
entry->injector = currentInjectorState;
|
||||
uint32_t nowUs = NT2US(timestamp);
|
||||
|
||||
buffer->nextIdx++;
|
||||
// TS uses big endian, grumble
|
||||
entry->timestamp = SWAP_UINT32(nowUs);
|
||||
entry->priLevel = currentTrigger1;
|
||||
entry->secLevel = currentTrigger2;
|
||||
entry->trigger = currentTdc;
|
||||
entry->sync = engine->triggerCentral.triggerState.getShaftSynchronized();
|
||||
entry->coil = currentCoilState;
|
||||
entry->injector = currentInjectorState;
|
||||
}
|
||||
|
||||
// if the buffer is full...
|
||||
bool bufferFull = buffer->nextIdx >= efi::size(buffer->buffer);
|
||||
bool bufferFull = nextIdx >= efi::size(buffer->buffer);
|
||||
// ... or it's been too long since the last flush
|
||||
bool bufferTimedOut = buffer->startTime.hasElapsedSec(5);
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#pragma once
|
||||
#define VCS_DATE 20220905
|
||||
#define VCS_DATE 20220907
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3963821
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.48way.3963821"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.48way.3963821"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 387675106
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.all.387675106"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.all.387675106"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 621407886
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.alphax-2chan.621407886"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.alphax-2chan.621407886"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2617749613
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.alphax-4chan.2617749613"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.alphax-4chan.2617749613"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 198280901
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.atlas.198280901"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.atlas.198280901"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3791069723
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.core8.3791069723"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.core8.3791069723"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 387675106
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.cypress.387675106"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.cypress.387675106"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 387675106
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.f407-discovery.387675106"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.f407-discovery.387675106"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 387675106
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.f429-discovery.387675106"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.f429-discovery.387675106"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 1433898790
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.frankenso_na6.1433898790"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.frankenso_na6.1433898790"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3890640589
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.harley81.3890640589"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.harley81.3890640589"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2742875732
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellen-gm-e67.2742875732"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellen-gm-e67.2742875732"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3465560622
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellen-nb1.3465560622"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellen-nb1.3465560622"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2680539912
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellen121nissan.2680539912"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellen121nissan.2680539912"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 1731899544
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellen121vag.1731899544"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellen121vag.1731899544"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3924119260
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellen128.3924119260"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellen128.3924119260"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2404647270
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellen154hyundai.2404647270"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellen154hyundai.2404647270"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3844365030
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellen72.3844365030"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellen72.3844365030"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 900639720
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellen81.900639720"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellen81.900639720"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 49176622
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellen88bmw.49176622"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellen88bmw.49176622"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3538496864
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellenNA6.3538496864"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellenNA6.3538496864"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3071459850
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.hellenNA8_96.3071459850"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.hellenNA8_96.3071459850"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2144129326
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.kin.2144129326"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.kin.2144129326"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3637378836
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.mre_f4.3637378836"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.mre_f4.3637378836"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3637378836
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.mre_f7.3637378836"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.mre_f7.3637378836"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 1207020036
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.prometheus_405.1207020036"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.prometheus_405.1207020036"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 1207020036
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.prometheus_469.1207020036"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.prometheus_469.1207020036"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3000415380
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.proteus_f4.3000415380"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.proteus_f4.3000415380"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3000415380
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.proteus_f7.3000415380"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.proteus_f7.3000415380"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3000415380
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.proteus_h7.3000415380"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.proteus_h7.3000415380"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 1845865016
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.subaru_eg33_f7.1845865016"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.subaru_eg33_f7.1845865016"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3172187574
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.06.tdg-pdm8.3172187574"
|
||||
#define TS_SIGNATURE "rusEFI 2022.09.07.tdg-pdm8.3172187574"
|
||||
|
|
|
@ -212,13 +212,17 @@ int TriggerDecoderBase::getTotalRevolutionCounter() const {
|
|||
void PrimaryTriggerDecoder::resetTriggerState() {
|
||||
TriggerDecoderBase::resetTriggerState();
|
||||
|
||||
memset(timeOfLastEvent, 0, sizeof(timeOfLastEvent));
|
||||
memset(spinningEvents, 0, sizeof(spinningEvents));
|
||||
spinningEventIndex = 0;
|
||||
prevInstantRpmValue = 0;
|
||||
m_instantRpm = 0;
|
||||
|
||||
resetHasFullSync();
|
||||
resetInstantRpm();
|
||||
}
|
||||
|
||||
void PrimaryTriggerDecoder::resetInstantRpm() {
|
||||
memset(timeOfLastEvent, 0, sizeof(timeOfLastEvent));
|
||||
memset(spinningEvents, 0, sizeof(spinningEvents));
|
||||
spinningEventIndex = 0;
|
||||
}
|
||||
|
||||
void PrimaryTriggerDecoder::movePreSynchTimestamps() {
|
||||
|
@ -393,6 +397,10 @@ angle_t PrimaryTriggerDecoder::syncEnginePhase(int divider, int remainder, angle
|
|||
|
||||
if (totalShift > 0) {
|
||||
camResyncCounter++;
|
||||
|
||||
// Reset instant RPM, since the engine phase has now changed, invalidating the tooth history buffer
|
||||
// maybe TODO: could/should we rotate the buffer around to re-align it instead? Is that worth it?
|
||||
resetInstantRpm();
|
||||
}
|
||||
|
||||
return totalShift;
|
||||
|
|
|
@ -235,6 +235,8 @@ private:
|
|||
TriggerWaveform const & triggerShape, TriggerFormDetails *triggerFormDetails,
|
||||
uint32_t index, efitick_t nowNt);
|
||||
|
||||
void resetInstantRpm();
|
||||
|
||||
float m_instantRpm = 0;
|
||||
float m_instantRpmRatio = 0;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// This file was generated by Version2Header
|
||||
// Mon Sep 05 00:27:02 UTC 2022
|
||||
// Wed Sep 07 00:28:41 UTC 2022
|
||||
|
||||
|
||||
#ifndef GIT_HASH
|
||||
#define GIT_HASH "5d4f45bff6bfee2136fcda7b199d0b31edea6ef1"
|
||||
#define GIT_HASH "d2e6ff3da3f0644d5d3301bc87467e2c7ce47db8"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VCS_VERSION
|
||||
#define VCS_VERSION "46217"
|
||||
#define VCS_VERSION "46285"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue