auto-sync

This commit is contained in:
rusEfi 2016-01-21 19:02:57 -05:00
parent 92289dbb4f
commit a53c256868
4 changed files with 8 additions and 11 deletions

View File

@ -26,7 +26,8 @@ void initDodgeRam(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
}
void configureNeon2003TriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
bool useOnlyPrimary = false;
// todo: move sync point so that two channel does not have false trigger issues
bool useOnlyPrimary = true;
s->initialize(FOUR_STROKE_CAM_SENSOR, !useOnlyPrimary);
s->useRiseEdge = true;

View File

@ -452,12 +452,7 @@ static void adc_callback_slow(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
* an intermediate callback when the buffer is half full. */
if (adcp->state == ADC_COMPLETE) {
/* Calculates the average values from the ADC samples.*/
// newState.time = chimeNow();
for (int i = 0; i < slowAdc.size(); i++) {
/**
* todo: No need to average since DEPTH is '1'
*/
int value = getAvgAdcValue(i, slowAdc.samples, ADC_BUF_DEPTH_SLOW, slowAdc.size());
slowAdc.values.adc_data[i] = value;
}

View File

@ -147,10 +147,10 @@ public class AutoTest {
x = 105.0;
sendCommand("enable trigger_only_front");
chart = nextChart();
assertWave(true, msg, chart, EngineChart.INJECTOR_1, 0.208666666666667, 0.04, 0.2, x + 360);
assertWave(true, msg, chart, EngineChart.INJECTOR_2, 0.208666666666667, 0.04, 0.2, x + 180);
assertWave(true, msg, chart, EngineChart.INJECTOR_3, 0.208666666666667, 0.04, 0.2, x + 540);
assertWave(true, msg, chart, EngineChart.INJECTOR_4, 0.208666666666667, 0.04, 0.2, x);
assertWave(true, msg, chart, EngineChart.INJECTOR_1, 0.208666666666667, 0.1, 0.2, x + 360);
assertWave(true, msg, chart, EngineChart.INJECTOR_2, 0.208666666666667, 0.1, 0.2, x + 180);
assertWave(true, msg, chart, EngineChart.INJECTOR_3, 0.208666666666667, 0.1, 0.2, x + 540);
assertWave(true, msg, chart, EngineChart.INJECTOR_4, 0.208666666666667, 0.1, 0.2, x);
}
private static void testMazdaProtege() {

View File

@ -488,7 +488,8 @@ void testTriggerDecoder(void) {
testTriggerDecoder3("miata 1994", MIATA_1994_DEVIATOR, 11, 0.2985, 0.3890, MIATA_NA_GAP);
testTriggerDecoder3("citroen", CITROEN_TU3JP, 0, 0.4833, 0.0, 2.9994);
testTriggerDecoder3("neon NGC4", DODGE_NEON_2003, 70, 0.5000, 0.4983, CHRYSLER_NGC4_GAP);
// testTriggerDecoder3("neon NGC4", DODGE_NEON_2003, 70, 0.5000, 0.4983, CHRYSLER_NGC4_GAP);
testTriggerDecoder3("neon NGC4", DODGE_NEON_2003, 6, 0.5000, 0.0, CHRYSLER_NGC4_GAP);
{
printTriggerDebug = true;