auto-sync

This commit is contained in:
rusEfi 2015-04-21 15:04:45 -04:00
parent e37ce006be
commit 0af06b178e
3 changed files with 6 additions and 3 deletions

View File

@ -209,8 +209,11 @@ EXTERN_ENGINE
;
static void triggerShapeInfo(Engine *engine) {
#if EFI_PROD_CODE || EFI_SIMULATOR
TriggerShape *s = &engine->triggerShape;
#if EFI_PROD_CODE || EFI_SIMULATOR
scheduleMsg(logger, "useRise=%s", boolToString(s->useRiseEdge));
scheduleMsg(logger, "gap from %f to %f", s->syncRatioFrom, s->syncRatioTo);
for (int i = 0; i < s->getSize(); i++) {
scheduleMsg(logger, "event %d %f", i, s->eventAngles[i]);
}

View File

@ -36,6 +36,7 @@ TriggerShape::TriggerShape() :
wave(switchTimesBuffer, NULL) {
reset(OM_NONE, false);
wave.waves = h.waves;
// todo: false here, true in clear() what a mess!
useRiseEdge = false;
gapBothDirections = false;
isSynchronizationNeeded = false;
@ -99,6 +100,7 @@ void TriggerShape::calculateTriggerSynchPoint(DECLARE_ENGINE_PARAMETER_F) {
void TriggerShape::clear() {
tdcPosition = 0;
setTriggerSynchronizationGap(2);
// todo: true here, false in constructor() what a mess!
useRiseEdge = true;
invertOnAdd = false;

View File

@ -147,8 +147,6 @@ private:
int getCycleDuration() const;
};
void setTriggerSynchronizationGap(TriggerShape *s, float synchGap);
void setTriggerSynchronizationGap2(TriggerShape *s, float syncGapFrom, float syncRatioTo);
void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped, operation_mode_e operationMode);
#endif /* TRIGGER_STRUCTURE_H_ */