auto-sync

This commit is contained in:
rusEfi 2016-01-21 21:03:08 -05:00
parent 00b61ec87d
commit f8ee875c11
4 changed files with 16 additions and 4 deletions

View File

@ -111,6 +111,8 @@ typedef Map3D<IGN_RPM_COUNT, IGN_LOAD_COUNT> ign_Map3D_t;
typedef Map3D<FUEL_RPM_COUNT, FUEL_LOAD_COUNT> fuel_Map3D_t;
typedef Map3D<BARO_CORR_SIZE, BARO_CORR_SIZE> baroCorr_Map3D_t;
void setRpmBin(float array[], int size, float idleRpm, float topRpm);
void setTableBin(float array[], int size, float l, float r);
void setTableBin2(float array[], int size, float l, float r, float precision);
void setRpmTableBin(float array[], int size);

View File

@ -275,5 +275,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 20160116;
return 20160121;
}

View File

@ -61,7 +61,11 @@ public class IgnitionMapBuilder {
public static double getInitialAdvance(int rpm, double map, double advanceMax) {
double advance = getAdvanceForRpm(rpm, advanceMax);
return round10(advance + 0.3 * (100 - map));
if (rpm > 3000)
return round10(advance + 0.1 * (100 - map));
return round10(advance + 0.1 * (100 - map) * rpm / 3000);
}
public static double round10(double result) {

View File

@ -38,7 +38,13 @@ public class IgnitionMapBuilderTest {
assertEquals(16.5, getAdvanceForRpm(1200, 36));
assertEquals(29.5, getAdvanceForRpm(2400, 36));
assertEquals(47.5, getInitialAdvance(2400, 40, 36));
assertEquals(54.0, getInitialAdvance(4400, 40, 36));
assertEquals(36.0, getInitialAdvance(6000, 100, 36));
assertEquals(10.0, getInitialAdvance(600, 100, 36));
assertEquals(44.0, getInitialAdvance(6000, 20, 36));
assertEquals(34.3, getInitialAdvance(2400, 40, 36));
assertEquals(42.0, getInitialAdvance(4400, 40, 36));
assertEquals(11.6, getInitialAdvance(600, 20, 36));
}
}