auto-sync

This commit is contained in:
rusEfi 2016-08-20 09:02:06 -04:00
parent 90b842a29b
commit 04a2fc8d22
2 changed files with 22 additions and 8 deletions

View File

@ -41,14 +41,6 @@ TriggerShape::TriggerShape() :
memset(triggerIndexByAngle, 0, sizeof(triggerIndexByAngle));
}
int TriggerShape::getSize() const {
return size;
}
int TriggerShape::getTriggerShapeSynchPointIndex() {
return triggerShapeSynchPointIndex;
}
void TriggerShape::calculateTriggerSynchPoint(TriggerState *state DECLARE_ENGINE_PARAMETER_S) {
#if EFI_PROD_CODE || defined(__DOXYGEN__)
efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "calc s");
@ -126,6 +118,14 @@ void TriggerShape::initialize(operation_mode_e operationMode, bool needSecondTri
#endif
}
int TriggerShape::getSize() const {
return size;
}
int TriggerShape::getTriggerShapeSynchPointIndex() {
return triggerShapeSynchPointIndex;
}
int multi_wave_s::getChannelState(int channelIndex, int phaseIndex) const {
return waves[channelIndex].pinStates[phaseIndex];
}

View File

@ -27,6 +27,13 @@ EXTERN_ENGINE
;
static Logging *logger;
static void cam_icu_width_callback(ICUDriver *icup) {
}
static void cam_icu_period_callback(ICUDriver *icup) {
}
/**
* that's hardware timer input capture IRQ entry point
* 'width' events happens before the 'period' event
@ -70,6 +77,13 @@ static void shaft_icu_period_callback(ICUDriver *icup) {
static ICUConfig shaft_icucfg = { ICU_INPUT_ACTIVE_LOW, 100000, /* 100kHz ICU clock frequency. */
shaft_icu_width_callback, shaft_icu_period_callback };
/**
* this is about VTTi and stuff kind of cam sensor
*/
static ICUConfig cam_icucfg = { ICU_INPUT_ACTIVE_LOW, 100000, /* 100kHz ICU clock frequency. */
cam_icu_width_callback, cam_icu_period_callback };
static ICUDriver *turnOnTriggerInputPin(brain_pin_e hwPin) {
// configure pin
turnOnCapturePin("trigger", hwPin);