auto-sync

This commit is contained in:
rusEfi 2016-06-06 20:02:51 -04:00
parent 48613ed7c6
commit dbf59b6da9
2 changed files with 5 additions and 0 deletions

View File

@ -472,6 +472,10 @@ static void setCrankingFuel(float timeMs) {
}
static void setGlobalTriggerAngleOffset(float value) {
if (cisnan(value)) {
warning(OBD_PCM_Processor_Fault, "Invalid argument");
return;
}
engineConfiguration->globalTriggerAngleOffset = value;
incrementGlobalConfigurationVersion();
doPrintConfiguration(engine);

View File

@ -306,6 +306,7 @@ void initRpmCalculator(Logging *sharedLogger, Engine *engine) {
*/
void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle,
schfunc_t callback, void *param, RpmCalculator *calc) {
efiAssertVoid(!cisnan(angle), "NaN angle?");
efiAssertVoid(isValidRpm(rpm), "RPM check expected");
float delayUs = calc->oneDegreeUs * angle;
efiAssertVoid(!cisnan(delayUs), "NaN delay?");