auto-sync

This commit is contained in:
rusEfi 2016-08-20 22:02:12 -04:00
parent d2c7c1c993
commit e0fff92cd0
5 changed files with 23 additions and 4 deletions

View File

@ -73,6 +73,17 @@ uint32_t triggerMaxDuration = 0;
extern bool isInsideTriggerHandler;
void hwHandleVvtCamSignal(trigger_value_e front) {
// startOfCycleNt
if (ENGINE(isEngineChartEnabled)) {
// this is a performance optimization - array index is cheaper then invoking a method with 'switch'
addEngineSniffferEvent("VVT", front == TV_RISE ? WC_UP : WC_DOWN);
}
}
void hwHandleShaftSignal(trigger_event_e signal) {
triggerHanlderEntryTime = GET_TIMESTAMP();
isInsideTriggerHandler = true;

View File

@ -41,6 +41,7 @@ void triggerInfo(void);
efitime_t getCrankEventCounter(DECLARE_ENGINE_PARAMETER_F);
efitime_t getStartOfRevolutionIndex(DECLARE_ENGINE_PARAMETER_F);
void hwHandleShaftSignal(trigger_event_e signal);
void hwHandleVvtCamSignal(trigger_value_e front);
float getTriggerDutyCycle(int index);
void initTriggerCentral(Logging *sharedLogger, Engine *engine);
void printAllCallbacksHistogram(void);

View File

@ -97,6 +97,7 @@ public:
void resetRunningCounters();
uint32_t runningRevolutionCounter;
efitick_t startOfCycleNt;
private:
void resetCurrentCycleState();
@ -106,7 +107,6 @@ private:
uint32_t totalRevolutionCounter;
bool isFirstEvent;
efitime_t prevCycleDuration;
efitick_t startOfCycleNt;
};
angle_t getEngineCycle(operation_mode_e operationMode);

View File

@ -209,8 +209,8 @@ int
{
if (n != 0) {
const u_char *us1 = (const u_char *)s1;
const u_char *us2 = (const u_char *)s2;
const char *us1 = (const char *)s1;
const char *us2 = (const char *)s2;
do {
if (mytolower(*us1) != mytolower(*us2))

View File

@ -154,6 +154,13 @@ static void scheduleReboot(void) {
unlockAnyContext();
}
/**
* Current engine configuration. On firmware start we assign empty configuration, then
* we copy actual configuration after reading settings.
* This is useful to compare old and new configurations in order to apply new settings.
*
* todo: place this field next to 'engineConfiguration'?
*/
engine_configuration_s activeConfiguration;
static void rememberCurrentConfiguration(void) {
@ -296,5 +303,5 @@ int getRusEfiVersion(void) {
return 123; // this is here to make the compiler happy about the unused array
if (UNUSED_CCM_SIZE[0] * 0 != 0)
return 3211; // this is here to make the compiler happy about the unused array
return 20160810;
return 20160819;
}