2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file event_registry.cpp
|
|
|
|
* @brief This data structure knows when to do what
|
|
|
|
*
|
|
|
|
* @date Nov 27, 2013
|
2015-12-31 13:02:30 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2016
|
2015-07-10 06:01:56 -07:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* This file is part of rusEfi - see http://rusefi.com
|
|
|
|
*
|
|
|
|
* rusEfi is free software; you can redistribute it and/or modify it under the terms of
|
|
|
|
* the GNU General Public License as published by the Free Software Foundation; either
|
|
|
|
* version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
|
|
|
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with this program.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "event_registry.h"
|
|
|
|
#include "main.h"
|
|
|
|
#include "engine_math.h"
|
|
|
|
|
|
|
|
InjectionEvent::InjectionEvent() {
|
|
|
|
isSimultanious = false;
|
2016-08-28 15:01:46 -07:00
|
|
|
isOverlapping = false;
|
2016-08-30 18:02:38 -07:00
|
|
|
injectorIndex = 0;
|
2016-08-30 19:02:21 -07:00
|
|
|
output = NULL;
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
event_trigger_position_s::event_trigger_position_s() {
|
|
|
|
eventIndex = 0;
|
|
|
|
eventAngle = 0;
|
|
|
|
angleOffset = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
IgnitionEvent::IgnitionEvent() {
|
|
|
|
name = NULL;
|
|
|
|
next = NULL;
|
2016-11-26 21:01:22 -08:00
|
|
|
memset(outputs, 0, sizeof(outputs));
|
2015-07-10 06:01:56 -07:00
|
|
|
advance = NAN;
|
2016-11-01 18:03:07 -07:00
|
|
|
sparkId = 0;
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
//void registerActuatorEventWhat(InjectionEventList *list, int eventIndex, OutputSignal *actuator, float angleOffset) {
|
|
|
|
// ActuatorEvent *e = list->getNextActuatorEvent();
|
|
|
|
// if (e == NULL)
|
|
|
|
// return; // error already reported
|
|
|
|
// e->position.eventIndex = eventIndex;
|
|
|
|
// e->actuator = actuator;
|
|
|
|
// e->position.angleOffset = angleOffset;
|
|
|
|
//}
|