auto-sync

This commit is contained in:
rusEfi 2014-08-31 07:02:40 -05:00
parent c4b46b5254
commit 7818f65f51
6 changed files with 27 additions and 20 deletions

View File

@ -91,7 +91,6 @@ static void reportEventToWaveChart(trigger_event_e ckpSignalType, int index) {
}
}
void TriggerCentral::handleShaftSignal(configuration_s *configuration, trigger_event_e signal, uint64_t nowUs) {
efiAssertVoid(configuration!=NULL, "configuration");
@ -173,6 +172,15 @@ extern engine_configuration2_s * engineConfiguration2;
extern board_configuration_s *boardConfiguration;
#endif
static void triggerShapeInfo() {
#if EFI_PROD_CODE || EFI_SIMULATOR
trigger_shape_s *s = &engineConfiguration2->triggerShape;
for (int i = 0; i < s->getSize(); i++) {
scheduleMsg(&logger, "event %d %f", i, s->eventAngles[i]);
}
#endif
}
static void triggerInfo() {
#if EFI_PROD_CODE || EFI_SIMULATOR
scheduleMsg(&logger, "Template %s/%d trigger %d", getConfigurationName(engineConfiguration),
@ -216,11 +224,12 @@ void initTriggerCentral(void) {
#if EFI_WAVE_CHART
initWaveChart(&waveChart);
#endif
#endif /* EFI_WAVE_CHART */
#if EFI_PROD_CODE || EFI_SIMULATOR
initLogging(&logger, "ShaftPosition");
addConsoleAction("triggerinfo", triggerInfo);
addConsoleAction("triggershapeinfo", triggerShapeInfo);
#endif
#if EFI_HISTOGRAMS

View File

@ -23,26 +23,24 @@
void initializeMazdaMiataNaShape(trigger_shape_s *s) {
s->reset(FOUR_STROKE_CAM_SENSOR);
setTriggerSynchronizationGap(s, 1.68f);
float z = 0.093;
s->useRiseEdge = false;
s->isSynchronizationNeeded = true;
s->addEvent(180.0f - 1.75 * z * 720, T_SECONDARY, TV_HIGH);
s->addEvent(180.0f - 0.75 * z * 720, T_SECONDARY, TV_LOW);
s->addEvent(49.15363636, T_SECONDARY, TV_HIGH);
s->addEvent(114.1581818, T_SECONDARY, TV_LOW);
s->addEvent(213.0222222, T_PRIMARY, TV_HIGH);
s->addEvent(225.759, T_SECONDARY, TV_HIGH);
s->addEvent(279.54375, T_PRIMARY, TV_LOW);
s->addEvent(294.786, T_SECONDARY, TV_LOW);
s->addEvent(360.0f - 2 * z * 720, T_PRIMARY, TV_HIGH);
s->addEvent(360.0f - 1.75 * z * 720, T_SECONDARY, TV_HIGH);
s->addEvent(360.0f - z * 720, T_PRIMARY, TV_LOW);
s->addEvent(360.0f - 0.75 * z * 720, T_SECONDARY, TV_LOW);
s->addEvent(410.318, T_SECONDARY, TV_HIGH);
s->addEvent(477.6911111, T_SECONDARY, TV_LOW);
s->addEvent(540.0f - 1.75 * z * 720, T_SECONDARY, TV_HIGH);
s->addEvent(540.0f - 0.75 * z * 720, T_SECONDARY, TV_LOW);
s->addEvent(720.0f - 2 * z * 720, T_PRIMARY, TV_HIGH);
s->addEvent(720.0f - 1.75 * z * 720, T_SECONDARY, TV_HIGH);
s->addEvent(720.0f - 0.75 * z * 720, T_SECONDARY, TV_LOW);
s->addEvent(576.4975, T_PRIMARY, TV_HIGH);
s->addEvent(590.39625, T_SECONDARY, TV_HIGH);
s->addEvent(656.5125, T_SECONDARY, TV_LOW);
s->addEvent(720.0f, T_PRIMARY, TV_LOW);
s->shaftPositionEventCount = s->getSize();

View File

@ -229,5 +229,5 @@ void firmwareError(const char *fmt, ...) {
}
int getRusEfiVersion(void) {
return 20140830;
return 20140831;
}

View File

@ -1,5 +1,5 @@
// This file was generated by Version2Header
// Thu Aug 21 13:54:37 EDT 2014
// Sun Aug 31 07:15:41 EDT 2014
#ifndef VCS_VERSION
#define VCS_VERSION "4372"
#define VCS_VERSION "4498"
#endif

View File

@ -126,7 +126,7 @@ int main(void) {
testFLStack();
// resizeMap();
printf("Success 20130829\r\n");
printf("Success 20130830\r\n");
return EXIT_SUCCESS;
}

View File

@ -472,7 +472,7 @@ void testTriggerDecoder(void) {
testTriggerDecoder2("testMitsu", MITSU_4G93, 3, 0.3750, 0.3889);
// testTriggerDecoder2("miata 1990", MIATA_1990, 0, 0.6280, 0.0);
testTriggerDecoder2("miata 1994", MIATA_1994, 11, 0.2790, 0.3720);
testTriggerDecoder2("miata 1994", MIATA_1994, 11, 0.2917, 0.3716);
testMazda323();