auto-sync

This commit is contained in:
rusEfi 2015-04-13 18:08:02 -04:00
parent 8b21c46931
commit fd34289d1f
3 changed files with 14 additions and 9 deletions

View File

@ -24,6 +24,10 @@
#include "main.h"
#include "engine_math.h"
IgnitionEvent::IgnitionEvent() {
name = NULL;
}
//void registerActuatorEventWhat(ActuatorEventList *list, int eventIndex, OutputSignal *actuator, float angleOffset) {
// ActuatorEvent *e = list->getNextActuatorEvent();
// if (e == NULL)

View File

@ -30,7 +30,8 @@ public:
angle_t angleOffset;
};
typedef struct {
class InjectionEvent {
public:
event_trigger_position_s position;
OutputSignal *actuator;
/**
@ -38,16 +39,16 @@ typedef struct {
* injectors together if that's the case
*/
bool_t isSimultanious;
} InjectionEvent;
};
typedef struct IgnitionEvent_struct IgnitionEvent;
struct IgnitionEvent_struct {
class IgnitionEvent {
public:
IgnitionEvent();
NamedOutputPin *output;
scheduling_s signalTimerUp;
scheduling_s signalTimerDown;
event_trigger_position_s dwellPosition;
float advance;
event_trigger_position_s dwellPosition;
event_trigger_position_s sparkPosition;
IgnitionEvent *next;
char *name;

View File

@ -24,7 +24,7 @@ bool assertNotInList(T *head, T*element) {
{
if (++counter > QUEUE_LENGTH_LIMIT) {
firmwareError("Looped queue?");
return FALSE;
return false;
}
if (current == element) {
/**
@ -33,10 +33,10 @@ bool assertNotInList(T *head, T*element) {
* by time with slow RPM the whole next fast revolution might be within the wait period
*/
warning(OBD_PCM_Processor_Fault, "re-adding element into event_queue: [%s]", element->name);
return TRUE;
return true;
}
}
return FALSE;
return false;
}
class EventQueue {