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 "main.h"
#include "engine_math.h" #include "engine_math.h"
IgnitionEvent::IgnitionEvent() {
name = NULL;
}
//void registerActuatorEventWhat(ActuatorEventList *list, int eventIndex, OutputSignal *actuator, float angleOffset) { //void registerActuatorEventWhat(ActuatorEventList *list, int eventIndex, OutputSignal *actuator, float angleOffset) {
// ActuatorEvent *e = list->getNextActuatorEvent(); // ActuatorEvent *e = list->getNextActuatorEvent();
// if (e == NULL) // if (e == NULL)

View File

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

View File

@ -24,7 +24,7 @@ bool assertNotInList(T *head, T*element) {
{ {
if (++counter > QUEUE_LENGTH_LIMIT) { if (++counter > QUEUE_LENGTH_LIMIT) {
firmwareError("Looped queue?"); firmwareError("Looped queue?");
return FALSE; return false;
} }
if (current == element) { 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 * 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); warning(OBD_PCM_Processor_Fault, "re-adding element into event_queue: [%s]", element->name);
return TRUE; return true;
} }
} }
return FALSE; return false;
} }
class EventQueue { class EventQueue {