auto-sync

This commit is contained in:
rusEfi 2015-05-14 23:10:04 -04:00
parent 5a7c2977af
commit 7fe72ed4a8
5 changed files with 11 additions and 9 deletions

View File

@ -70,8 +70,8 @@ float getBaseAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_S) {
return result;
}
float getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_S) {
float angle;
angle_t getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_S) {
angle_t angle;
if (isCrankingR(rpm)) {
angle = engineConfiguration->crankingTimingAngle;
} else {

View File

@ -10,7 +10,7 @@
#include "engine.h"
float getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_S);
angle_t getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_S);
void setDefaultIatTimingCorrection(DECLARE_ENGINE_PARAMETER_F);
void prepareTimingMap(DECLARE_ENGINE_PARAMETER_F);

View File

@ -103,7 +103,7 @@ uint64_t EventQueue::getNextEventTime(uint64_t nowX) {
return EMPTY_QUEUE;
}
// static scheduling_s * longScheduling;
static scheduling_s * longScheduling;
uint32_t maxEventQueueTime = 0;
uint32_t lastEventQueueTime;
@ -158,10 +158,10 @@ int EventQueue::executeAll(uint64_t now) {
lastEventQueueTime = GET_TIMESTAMP() - before;
if (lastEventQueueTime > maxEventQueueTime)
maxEventQueueTime = lastEventQueueTime;
// if (cost > 2000) {
// longScheduling = current;
// cost++;
// }
if (lastEventQueueTime > 2000) {
longScheduling = current;
lastEventQueueTime++;
}
}
return executionCounter;
}

View File

@ -295,7 +295,7 @@ void triggerInfo(Engine *engine) {
scheduleMsg(logger, "zeroTestTime=%d maxHowFarOff=%d", engine->m.zeroTestTime, maxHowFarOff);
maxHowFarOff = 0;
scheduleMsg(logger, "advanceLookupTime=%d t=%d fuelCalcTime=%d",
scheduleMsg(logger, "advanceLookupTime=%d now=%d fuelCalcTime=%d",
engine->m.advanceLookupTime, *cyccnt,
engine->m.fuelCalcTime);

View File

@ -20,6 +20,8 @@ public class DefaultExceptionHandler implements Thread.UncaughtExceptionHandler
}
public static void handleException(Throwable e) {
if (e == null)
throw new NullPointerException("Throwable e");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos);
e.printStackTrace(ps);