Annotations in C++ code to produce formulas in rusEfi console #807
This commit is contained in:
parent
10b8989dc8
commit
ded41e5efe
|
@ -0,0 +1,21 @@
|
|||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger.txt Sat Jun 29 20:53:25 EDT 2019
|
||||
// begin
|
||||
#ifndef CONTROLLERS_GENERATED_TRIGGER_STRUCTS_H
|
||||
#define CONTROLLERS_GENERATED_TRIGGER_STRUCTS_H
|
||||
#include "rusefi_types.h"
|
||||
#define HW_EVENT_TYPES 6
|
||||
// start of trigger_central_s
|
||||
struct trigger_central_s {
|
||||
trigger_central_s();
|
||||
/**
|
||||
* offset 0
|
||||
*/
|
||||
int hwEventCounters[HW_EVENT_TYPES];
|
||||
/** total size 24*/
|
||||
};
|
||||
|
||||
typedef struct trigger_central_s trigger_central_s;
|
||||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger.txt Sat Jun 29 20:53:25 EDT 2019
|
|
@ -24,7 +24,11 @@
|
|||
|
||||
#include "rpm_calculator.h"
|
||||
|
||||
TriggerCentral::TriggerCentral() : hwEventCounters() {
|
||||
trigger_central_s::trigger_central_s() : hwEventCounters() {
|
||||
|
||||
}
|
||||
|
||||
TriggerCentral::TriggerCentral() : trigger_central_s() {
|
||||
// we need this initial to have not_running at first invocation
|
||||
previousShaftEventTimeNt = (efitimems_t) -10 * US2NT(US_PER_SECOND_LL);
|
||||
|
||||
|
|
|
@ -11,20 +11,19 @@
|
|||
#include "rusefi_enums.h"
|
||||
#include "listener_array.h"
|
||||
#include "trigger_decoder.h"
|
||||
#include "trigger_structs.h"
|
||||
|
||||
class Engine;
|
||||
typedef void (*ShaftPositionListener)(trigger_event_e signal, uint32_t index DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
#define HAVE_CAM_INPUT() engineConfiguration->camInput != GPIO_UNASSIGNED
|
||||
|
||||
#define HW_EVENT_TYPES 6
|
||||
|
||||
/**
|
||||
* Maybe merge TriggerCentral and TriggerState classes into one class?
|
||||
* Probably not: we have an instance of TriggerState which is used for trigger initialization,
|
||||
* also composition probably better than inheritance here
|
||||
*/
|
||||
class TriggerCentral {
|
||||
class TriggerCentral : public trigger_central_s {
|
||||
public:
|
||||
TriggerCentral();
|
||||
void addEventListener(ShaftPositionListener handler, const char *name, Engine *engine);
|
||||
|
@ -49,7 +48,6 @@ public:
|
|||
volatile efitime_t previousShaftEventTimeNt;
|
||||
private:
|
||||
IntListenerArray<15> triggerListeneres;
|
||||
int hwEventCounters[HW_EVENT_TYPES];
|
||||
|
||||
// Used by 'useNoiselessTriggerDecoder', see handleShaftSignal()
|
||||
efitick_t lastSignalTimes[HW_EVENT_TYPES];
|
||||
|
|
Loading…
Reference in New Issue