auto-sync
This commit is contained in:
parent
afc48b6ad4
commit
2a05e2cd65
|
@ -9,12 +9,6 @@ case AC_RELAY:
|
|||
return "AC_RELAY";
|
||||
case ALTERNATOR_SWITCH:
|
||||
return "ALTERNATOR_SWITCH";
|
||||
case ELECTRONIC_THROTTLE_CONTROL_1:
|
||||
return "ELECTRONIC_THROTTLE_CONTROL_1";
|
||||
case ELECTRONIC_THROTTLE_CONTROL_2:
|
||||
return "ELECTRONIC_THROTTLE_CONTROL_2";
|
||||
case ELECTRONIC_THROTTLE_CONTROL_3:
|
||||
return "ELECTRONIC_THROTTLE_CONTROL_3";
|
||||
case FAN_RELAY:
|
||||
return "FAN_RELAY";
|
||||
case FUEL_PUMP_RELAY:
|
||||
|
|
|
@ -67,12 +67,12 @@ public:
|
|||
class EngineState {
|
||||
public:
|
||||
/**
|
||||
* WIP: accessing these values here would be a performance optimization since log() function needed for
|
||||
* thermistor logic is relatively heavy
|
||||
* Access to these two fields is not synchronized in any way - that should work since float read/write are atomic.
|
||||
*/
|
||||
float iat;
|
||||
float clt;
|
||||
|
||||
|
||||
};
|
||||
|
||||
class RpmCalculator;
|
||||
|
@ -85,11 +85,17 @@ public:
|
|||
engine_configuration_s *engineConfiguration;
|
||||
engine_configuration2_s *engineConfiguration2;
|
||||
|
||||
/**
|
||||
* this is about 'stopengine' command
|
||||
*/
|
||||
uint64_t stopEngineRequestTimeNt;
|
||||
|
||||
Thermistor iat;
|
||||
Thermistor clt;
|
||||
|
||||
/**
|
||||
* ignition dwell duration as crankshaft angle
|
||||
*/
|
||||
float dwellAngle;
|
||||
float advance;
|
||||
|
||||
|
|
|
@ -63,10 +63,6 @@ typedef enum {
|
|||
|
||||
IO_INVALID,
|
||||
|
||||
ELECTRONIC_THROTTLE_CONTROL_1,
|
||||
ELECTRONIC_THROTTLE_CONTROL_2,
|
||||
ELECTRONIC_THROTTLE_CONTROL_3,
|
||||
|
||||
/**
|
||||
* these seven segment display pins are related to unused external tachometer code
|
||||
* I still have the hardware so maybe one day I will fix it, but for now it's just dead code
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* @file rusefi_types.h
|
||||
*
|
||||
* @date Jan 12, 2015
|
||||
* @author Andrey Belomutskiy, (c) 2012-2014
|
||||
*/
|
||||
#ifndef CONTROLLERS_ALGO_RUSEFI_TYPES_H_
|
||||
#define CONTROLLERS_ALGO_RUSEFI_TYPES_H_
|
||||
|
||||
/**
|
||||
* integer time in milliseconds
|
||||
* 32 bit 4B / 1000 = 4M seconds = 1111.11 hours = 46 days.
|
||||
* Please restart your ECU every 46 days? :)
|
||||
*/
|
||||
typedef uint32_t efitimems_t;
|
||||
|
||||
/**
|
||||
* 64 bit time in microseconds, since boot
|
||||
*/
|
||||
typedef uint64_t efitimeus_t;
|
||||
|
||||
/**
|
||||
* platform-dependent tick since boot
|
||||
* in case of stm32f4 that's a CPU tick
|
||||
*/
|
||||
typedef uint64_t efitick_t;
|
||||
|
||||
typedef float angle_t;
|
||||
|
||||
/**
|
||||
* numeric value from 0 to 100
|
||||
*/
|
||||
typedef float percent_t;
|
||||
|
||||
#endif /* CONTROLLERS_ALGO_RUSEFI_TYPES_H_ */
|
|
@ -12,34 +12,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include "efifeatures.h"
|
||||
|
||||
/**
|
||||
* integer time in milliseconds
|
||||
* 32 bit 4B / 1000 = 4M seconds = 1111.11 hours = 46 days.
|
||||
* Please restart your ECU every 46 days? :)
|
||||
*/
|
||||
typedef uint32_t efitimems_t;
|
||||
|
||||
/**
|
||||
* 64 bit time in microseconds, since boot
|
||||
*/
|
||||
typedef uint64_t efitimeus_t;
|
||||
|
||||
/**
|
||||
* platform-dependent tick since boot
|
||||
* in case of stm32f4 that's a CPU tick
|
||||
*/
|
||||
typedef uint64_t efitick_t;
|
||||
|
||||
/**
|
||||
* numeric value from 0 to 100
|
||||
*/
|
||||
typedef float percent_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
#include "rusefi_types.h"
|
||||
|
||||
#define US_PER_SECOND 1000000
|
||||
#define US_PER_SECOND_LL 1000000LL
|
||||
|
@ -51,6 +24,12 @@ extern "C"
|
|||
// todo: implement a function to work with times considering counter overflow
|
||||
#define overflowDiff(now, time) ((now) - (time))
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/**
|
||||
* 64-bit counter of microseconds (1/1 000 000 of a second) since MCU reset
|
||||
*
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "table_helper.h"
|
||||
#include "engine.h"
|
||||
|
||||
// todo: this value is too low for 6 cyl engine, get it back to 60
|
||||
#define OUTPUT_SIGNAL_MAX_SIZE 90
|
||||
|
||||
typedef ArrayList<OutputSignal, OUTPUT_SIGNAL_MAX_SIZE> OutputSignalList;
|
||||
|
|
|
@ -280,7 +280,7 @@ void showMainHistogram(void) {
|
|||
static void doSomeCalc(int rpm DECLARE_ENGINE_PARAMETER_S) {
|
||||
/**
|
||||
* Within one engine cycle all cylinders are fired with same timing advance.
|
||||
* todo: one day we can control cylinders individually
|
||||
* todo: one day we can control cylinders individually?
|
||||
*/
|
||||
float dwellMs = getSparkDwellMsT(rpm PASS_ENGINE_PARAMETER);
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ typedef unsigned int time_t;
|
|||
#endif
|
||||
|
||||
#include "efifeatures.h"
|
||||
#include "rusefi_types.h"
|
||||
#include "rusefi_enums.h"
|
||||
#if EFI_PROD_CODE
|
||||
#include "io_pins.h"
|
||||
|
|
Loading…
Reference in New Issue