log the state of hasSynchronizedPhase() (#4478)
* s * log whether we've synced phase * trigger_state_primary * need that file * engine state is not the right spot
This commit is contained in:
parent
120917981b
commit
73abcb044d
|
@ -104,6 +104,15 @@ const trigger_state_s* getLiveDataAddr(size_t idx) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
const trigger_state_primary_s* getLiveDataAddr() {
|
||||||
|
#if EFI_SHAFT_POSITION_INPUT
|
||||||
|
return &engine->triggerCentral.triggerState;
|
||||||
|
#else
|
||||||
|
return nullptr;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
const wall_fuel_state_s* getLiveDataAddr() {
|
const wall_fuel_state_s* getLiveDataAddr() {
|
||||||
return &engine->injectionEvents.elements[0].wallFuel;
|
return &engine->injectionEvents.elements[0].wallFuel;
|
||||||
|
|
|
@ -100,10 +100,6 @@ running_fuel_s running
|
||||||
bit clutchDownState;@@INDICATOR_NAME_CLUTCH_DOWN@@
|
bit clutchDownState;@@INDICATOR_NAME_CLUTCH_DOWN@@
|
||||||
bit brakePedalState;@@INDICATOR_NAME_BRAKE_DOWN@@
|
bit brakePedalState;@@INDICATOR_NAME_BRAKE_DOWN@@
|
||||||
|
|
||||||
! would have been nice to have this 'isSynchronizedPhase' on PrimaryTriggerDecoder but that would require
|
|
||||||
! new trigger_primary_state.txt and multiple inheritance?
|
|
||||||
bit isSynchronizedPhase
|
|
||||||
|
|
||||||
float egt1
|
float egt1
|
||||||
float egt2
|
float egt2
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "trigger_structure.h"
|
#include "trigger_structure.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
#include "trigger_state_generated.h"
|
#include "trigger_state_generated.h"
|
||||||
|
#include "trigger_state_primary_generated.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
class TriggerDecoderBase;
|
class TriggerDecoderBase;
|
||||||
|
@ -163,7 +164,7 @@ private:
|
||||||
/**
|
/**
|
||||||
* the reason for sub-class is simply to save RAM but not having statistics in the trigger initialization instance
|
* the reason for sub-class is simply to save RAM but not having statistics in the trigger initialization instance
|
||||||
*/
|
*/
|
||||||
class PrimaryTriggerDecoder : public TriggerDecoderBase {
|
class PrimaryTriggerDecoder : public TriggerDecoderBase, public trigger_state_primary_s {
|
||||||
public:
|
public:
|
||||||
PrimaryTriggerDecoder(const char* name);
|
PrimaryTriggerDecoder(const char* name);
|
||||||
void resetTriggerState() override;
|
void resetTriggerState() override;
|
||||||
|
@ -232,7 +233,6 @@ private:
|
||||||
float m_instantRpmRatio = 0;
|
float m_instantRpmRatio = 0;
|
||||||
|
|
||||||
bool m_needsDisambiguation = false;
|
bool m_needsDisambiguation = false;
|
||||||
bool m_hasSynchronizedPhase = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class VvtTriggerDecoder : public TriggerDecoderBase {
|
class VvtTriggerDecoder : public TriggerDecoderBase {
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
struct_no_prefix trigger_state_primary_s
|
||||||
|
bit m_hasSynchronizedPhase
|
||||||
|
end_struct
|
|
@ -88,6 +88,11 @@ Usages:
|
||||||
prepend: integration/rusefi_config.txt
|
prepend: integration/rusefi_config.txt
|
||||||
output_name: [ "trg", "vvt1i", "vvt1e", "vvt2i", "vvt2e" ]
|
output_name: [ "trg", "vvt1i", "vvt1e", "vvt2i", "vvt2e" ]
|
||||||
|
|
||||||
|
- name: trigger_state_primary
|
||||||
|
java: TriggerStatePrimary.java
|
||||||
|
folder: controllers/trigger
|
||||||
|
prepend: integration/rusefi_config.txt
|
||||||
|
|
||||||
- name: wall_fuel_state
|
- name: wall_fuel_state
|
||||||
java: WallFuelState.java
|
java: WallFuelState.java
|
||||||
folder: controllers/algo
|
folder: controllers/algo
|
||||||
|
|
Loading…
Reference in New Issue