Merge branch 'master' of https://github.com/rusefi/rusefi
This commit is contained in:
commit
03b6a6ec58
|
@ -28,8 +28,8 @@ static ts_channel_s *tsChannel;
|
||||||
|
|
||||||
|
|
||||||
static THD_WORKING_AREA(btThreadStack, UTILITY_THREAD_STACK_SIZE);
|
static THD_WORKING_AREA(btThreadStack, UTILITY_THREAD_STACK_SIZE);
|
||||||
static thread_t *btThread = NULL;
|
static thread_t *btThread = nullptr;
|
||||||
static thread_reference_t btThreadRef = NULL; // used by thread suspend/resume as a flag
|
static thread_reference_t btThreadRef = nullptr; // used by thread suspend/resume as a flag
|
||||||
|
|
||||||
static LoggingWithStorage btLogger("bluetooth");
|
static LoggingWithStorage btLogger("bluetooth");
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* That's the list of pending spark firing events
|
* That's the list of pending spark firing events
|
||||||
*/
|
*/
|
||||||
IgnitionEvent *iHead = NULL;
|
IgnitionEvent *iHead = nullptr;
|
||||||
/**
|
/**
|
||||||
* this is based on isEngineChartEnabled and engineSnifferRpmThreshold settings
|
* this is based on isEngineChartEnabled and engineSnifferRpmThreshold settings
|
||||||
*/
|
*/
|
||||||
|
@ -158,12 +158,12 @@ public:
|
||||||
bool withError = false;
|
bool withError = false;
|
||||||
|
|
||||||
RpmCalculator rpmCalculator;
|
RpmCalculator rpmCalculator;
|
||||||
persistent_config_s *config = NULL;
|
persistent_config_s *config = nullptr;
|
||||||
/**
|
/**
|
||||||
* we use funny unique name to make sure that compiler is not confused between global variable and class member
|
* we use funny unique name to make sure that compiler is not confused between global variable and class member
|
||||||
* todo: this variable is probably a sign of some problem, should we even have it?
|
* todo: this variable is probably a sign of some problem, should we even have it?
|
||||||
*/
|
*/
|
||||||
engine_configuration_s *engineConfigurationPtr = NULL;
|
engine_configuration_s *engineConfigurationPtr = nullptr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this is about 'stopengine' command
|
* this is about 'stopengine' command
|
||||||
|
|
|
@ -66,10 +66,10 @@
|
||||||
#define DISPLAY_IF(x) x
|
#define DISPLAY_IF(x) x
|
||||||
|
|
||||||
#define DECLARE_ENGINE_PTR \
|
#define DECLARE_ENGINE_PTR \
|
||||||
Engine *engine = NULL; \
|
Engine *engine = nullptr; \
|
||||||
engine_configuration_s *engineConfiguration = NULL; \
|
engine_configuration_s *engineConfiguration = nullptr; \
|
||||||
persistent_config_s *config = NULL; \
|
persistent_config_s *config = nullptr; \
|
||||||
board_configuration_s *boardConfiguration = NULL;
|
board_configuration_s *boardConfiguration = nullptr;
|
||||||
|
|
||||||
|
|
||||||
#define INJECT_ENGINE_REFERENCE(x) \
|
#define INJECT_ENGINE_REFERENCE(x) \
|
||||||
|
|
|
@ -24,15 +24,15 @@ extern bool verboseMode;
|
||||||
uint32_t maxSchedulingPrecisionLoss = 0;
|
uint32_t maxSchedulingPrecisionLoss = 0;
|
||||||
|
|
||||||
scheduling_s::scheduling_s() {
|
scheduling_s::scheduling_s() {
|
||||||
callback = NULL;
|
callback = nullptr;
|
||||||
next = NULL;
|
next = nullptr;
|
||||||
param = NULL;
|
param = nullptr;
|
||||||
isScheduled = false;
|
isScheduled = false;
|
||||||
momentX = 0;
|
momentX = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EventQueue::EventQueue() {
|
EventQueue::EventQueue() {
|
||||||
head = NULL;
|
head = nullptr;
|
||||||
setLateDelay(100);
|
setLateDelay(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,8 +128,8 @@ static uint32_t lastEventCallbackDuration;
|
||||||
int EventQueue::executeAll(efitime_t now) {
|
int EventQueue::executeAll(efitime_t now) {
|
||||||
scheduling_s * current, *tmp;
|
scheduling_s * current, *tmp;
|
||||||
|
|
||||||
scheduling_s * executionList = NULL;
|
scheduling_s * executionList = nullptr;
|
||||||
scheduling_s * lastInExecutionList = NULL;
|
scheduling_s * lastInExecutionList = nullptr;
|
||||||
|
|
||||||
int listIterationCounter = 0;
|
int listIterationCounter = 0;
|
||||||
int executionCounter = 0;
|
int executionCounter = 0;
|
||||||
|
@ -233,5 +233,5 @@ scheduling_s *EventQueue::getForUnitText(int index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventQueue::clear(void) {
|
void EventQueue::clear(void) {
|
||||||
head = NULL;
|
head = nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,9 +41,9 @@ PwmConfig::PwmConfig() {
|
||||||
mode = PM_NORMAL;
|
mode = PM_NORMAL;
|
||||||
memset(&outputPins, 0, sizeof(outputPins));
|
memset(&outputPins, 0, sizeof(outputPins));
|
||||||
phaseCount = 0;
|
phaseCount = 0;
|
||||||
pwmCycleCallback = NULL;
|
pwmCycleCallback = nullptr;
|
||||||
stateChangeCallback = NULL;
|
stateChangeCallback = nullptr;
|
||||||
executor = NULL;
|
executor = nullptr;
|
||||||
name = "[noname]";
|
name = "[noname]";
|
||||||
arg = this;
|
arg = this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
PwmConfig();
|
PwmConfig();
|
||||||
PwmConfig(float *switchTimes, SingleWave *waves);
|
PwmConfig(float *switchTimes, SingleWave *waves);
|
||||||
void init(float *switchTimes, SingleWave *waves);
|
void init(float *switchTimes, SingleWave *waves);
|
||||||
void *arg = NULL;
|
void *arg = nullptr;
|
||||||
|
|
||||||
void weComplexInit(const char *msg,
|
void weComplexInit(const char *msg,
|
||||||
ExecutorInterface *executor,
|
ExecutorInterface *executor,
|
||||||
|
@ -102,7 +102,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* this main callback is invoked when it's time to switch level on any of the output channels
|
* this main callback is invoked when it's time to switch level on any of the output channels
|
||||||
*/
|
*/
|
||||||
pwm_gen_callback *stateChangeCallback = NULL;
|
pwm_gen_callback *stateChangeCallback = nullptr;
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* float value of PWM period
|
* float value of PWM period
|
||||||
|
|
|
@ -44,5 +44,5 @@ extern WaveChart waveChart;
|
||||||
InjectionSignalPair::InjectionSignalPair() {
|
InjectionSignalPair::InjectionSignalPair() {
|
||||||
isScheduled = false;
|
isScheduled = false;
|
||||||
memset(outputs, 0, sizeof(outputs));
|
memset(outputs, 0, sizeof(outputs));
|
||||||
event = NULL;
|
event = nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ EXTERN_ENGINE
|
||||||
;
|
;
|
||||||
extern bool hasFirmwareErrorFlag;
|
extern bool hasFirmwareErrorFlag;
|
||||||
|
|
||||||
static const char *prevOutputName = NULL;
|
static const char *prevOutputName = nullptr;
|
||||||
|
|
||||||
static InjectionEvent primeInjEvent;
|
static InjectionEvent primeInjEvent;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ extern bool verboseMode;
|
||||||
static cyclic_buffer<int> ignitionErrorDetection;
|
static cyclic_buffer<int> ignitionErrorDetection;
|
||||||
static Logging *logger;
|
static Logging *logger;
|
||||||
|
|
||||||
static const char *prevSparkName = NULL;
|
static const char *prevSparkName = nullptr;
|
||||||
|
|
||||||
IgnitionEventList::IgnitionEventList() {
|
IgnitionEventList::IgnitionEventList() {
|
||||||
isReady = false;
|
isReady = false;
|
||||||
|
@ -100,7 +100,7 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngle, floatms_t sparkD
|
||||||
secondOutput = &enginePins.coils[secondCoilIndex];
|
secondOutput = &enginePins.coils[secondCoilIndex];
|
||||||
assertPinAssigned(secondOutput);
|
assertPinAssigned(secondOutput);
|
||||||
} else {
|
} else {
|
||||||
secondOutput = NULL;
|
secondOutput = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
assertPinAssigned(output);
|
assertPinAssigned(output);
|
||||||
|
|
|
@ -212,7 +212,7 @@ void brain_pin_markUnused(brain_pin_e brainPin)
|
||||||
|
|
||||||
if (getBrainUsedPin(index) != NULL)
|
if (getBrainUsedPin(index) != NULL)
|
||||||
totalPinsUsed--;
|
totalPinsUsed--;
|
||||||
getBrainUsedPin(index) = NULL;
|
getBrainUsedPin(index) = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -255,7 +255,7 @@ void gpio_pin_markUnused(ioportid_t port, ioportmask_t pin) {
|
||||||
|
|
||||||
if (getBrainUsedPin(index) != NULL)
|
if (getBrainUsedPin(index) != NULL)
|
||||||
totalPinsUsed--;
|
totalPinsUsed--;
|
||||||
getBrainUsedPin(index) = NULL;
|
getBrainUsedPin(index) = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getPinFunction(brain_input_pin_e brainPin) {
|
const char *getPinFunction(brain_input_pin_e brainPin) {
|
||||||
|
|
Loading…
Reference in New Issue