mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
674465b84e
commit
5995f6b115
|
@ -75,6 +75,12 @@ static ICUDriver *turnOnTriggerInputPin(brain_pin_e hwPin) {
|
|||
scheduleMsg(logger, "turnOnTriggerInputPin %s", hwPortname(hwPin));
|
||||
// todo: reuse 'setWaveReaderMode' method here?
|
||||
if (driver != NULL) {
|
||||
bool_t needWidthCallback = !CONFIG(useOnlyFrontForTrigger) || TRIGGER_SHAPE(useRiseEdge);
|
||||
shaft_icucfg.width_cb = needWidthCallback ? shaft_icu_width_callback : NULL;
|
||||
|
||||
bool_t needPeriodCallback = !CONFIG(useOnlyFrontForTrigger) || !TRIGGER_SHAPE(useRiseEdge);
|
||||
shaft_icucfg.width_cb = needPeriodCallback ? shaft_icu_period_callback : NULL;
|
||||
|
||||
efiIcuStart(driver, &shaft_icucfg);
|
||||
icuEnable(driver);
|
||||
}
|
||||
|
|
|
@ -290,5 +290,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 20150409;
|
||||
return 20150410;
|
||||
}
|
||||
|
|
|
@ -78,8 +78,8 @@ public class TestingUtils {
|
|||
if (isRealHardware)
|
||||
return;
|
||||
RevolutionLog revolutionLog = chart.getRevolutionsLog();
|
||||
if (revolutionLog.keySet().isEmpty())
|
||||
throw new IllegalStateException(msg + " Empty revolutions in " + chart);
|
||||
if (revolutionLog.getSize() < 2)
|
||||
throw new IllegalStateException(msg + " Not many revolutions in " + chart);
|
||||
|
||||
StringBuilder events = chart.get(key);
|
||||
assertTrue(msg + " Events not null for " + key, events != null);
|
||||
|
|
|
@ -30,6 +30,10 @@ public class RevolutionLog {
|
|||
return new RevolutionLog(time2rpm);
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return time2rpm.size();
|
||||
}
|
||||
|
||||
public String getCrankAngleByTimeString(double time) {
|
||||
double result = getCrankAngleByTime(time);
|
||||
return Double.isNaN(result) ? "n/a" : String.format("%.2f", result);
|
||||
|
|
Loading…
Reference in New Issue