docs & refactoring

This commit is contained in:
rusefi 2019-10-08 01:49:42 -04:00
parent 5bf399e280
commit cd1e87ff41
4 changed files with 13 additions and 18 deletions

View File

@ -6,8 +6,7 @@
* @author Andrey Belomutskiy, (c) 2012-2017
*/
#ifndef ENGINE_STATE_H_
#define ENGINE_STATE_H_
#pragma once
#include "global.h"
#include "engine_parts.h"
@ -103,9 +102,5 @@ public:
MockAdcState mockAdcState;
#endif /* EFI_ENABLE_MOCK_ADC */
};
#endif /* ENGINE_STATE_H_ */

View File

@ -5,8 +5,7 @@
* @author Andrey Belomutskiy, (c) 2012-2017
*/
#ifndef EVENT_REGISTRY_H_
#define EVENT_REGISTRY_H_
#pragma once
#include "global.h"
#include "signal_executor.h"
@ -73,5 +72,3 @@ public:
IgnitionEvent elements[MAX_IGNITION_EVENT_COUNT];
bool isReady;
};
#endif /* EVENT_REGISTRY_H_ */

View File

@ -5,8 +5,7 @@
* @author Andrey Belomutskiy, (c) 2012-2017
*/
#ifndef FUEL_MAP_H_
#define FUEL_MAP_H_
#pragma once
#include "engine.h"
@ -40,5 +39,3 @@ percent_t getInjectorDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
// convert injection duration (Ms/Nt) to fuel rate (L/h)
float getFuelRate(floatms_t totalInjDuration, efitick_t timePeriod DECLARE_ENGINE_PARAMETER_SUFFIX);
#endif /* FUEL_MAP_H_ */

View File

@ -4,22 +4,30 @@
* @date May 18, 2014
* @author Andrey Belomutskiy, (c) 2012-2017
*/
#ifndef SCHEDULER_H_
#define SCHEDULER_H_
#pragma once
#include "global.h"
typedef void (*schfunc_t)(void *);
/**
* This structure holds information about an event scheduled in the future: when to execute what callback with what parameters
*/
class scheduling_s {
public:
#if EFI_SIGNAL_EXECUTOR_SLEEP
virtual_timer_t timer;
#endif /* EFI_SIGNAL_EXECUTOR_SLEEP */
/**
* timestamp represented as 64-bit value of ticks since MCU start
*/
volatile efitime_t momentX = 0;
bool isScheduled = false;
/**
* Scheduler implementation has a linked list of these scheduling records.
*/
scheduling_s *next = nullptr;
schfunc_t callback = nullptr;
@ -34,5 +42,3 @@ public:
virtual void scheduleByTimestamp(scheduling_s *scheduling, efitimeus_t timeUs, schfunc_t callback, void *param) = 0;
virtual void scheduleForLater(scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param) = 0;
};
#endif /* SCHEDULER_H_ */