This commit is contained in:
rusefi 2019-09-22 08:45:03 -04:00
commit 03b6a6ec58
10 changed files with 27 additions and 27 deletions

View File

@ -28,8 +28,8 @@ static ts_channel_s *tsChannel;
static THD_WORKING_AREA(btThreadStack, UTILITY_THREAD_STACK_SIZE);
static thread_t *btThread = NULL;
static thread_reference_t btThreadRef = NULL; // used by thread suspend/resume as a flag
static thread_t *btThread = nullptr;
static thread_reference_t btThreadRef = nullptr; // used by thread suspend/resume as a flag
static LoggingWithStorage btLogger("bluetooth");

View File

@ -120,7 +120,7 @@ public:
/**
* That's the list of pending spark firing events
*/
IgnitionEvent *iHead = NULL;
IgnitionEvent *iHead = nullptr;
/**
* this is based on isEngineChartEnabled and engineSnifferRpmThreshold settings
*/
@ -158,12 +158,12 @@ public:
bool withError = false;
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
* 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

View File

@ -66,10 +66,10 @@
#define DISPLAY_IF(x) x
#define DECLARE_ENGINE_PTR \
Engine *engine = NULL; \
engine_configuration_s *engineConfiguration = NULL; \
persistent_config_s *config = NULL; \
board_configuration_s *boardConfiguration = NULL;
Engine *engine = nullptr; \
engine_configuration_s *engineConfiguration = nullptr; \
persistent_config_s *config = nullptr; \
board_configuration_s *boardConfiguration = nullptr;
#define INJECT_ENGINE_REFERENCE(x) \

View File

@ -24,15 +24,15 @@ extern bool verboseMode;
uint32_t maxSchedulingPrecisionLoss = 0;
scheduling_s::scheduling_s() {
callback = NULL;
next = NULL;
param = NULL;
callback = nullptr;
next = nullptr;
param = nullptr;
isScheduled = false;
momentX = 0;
}
EventQueue::EventQueue() {
head = NULL;
head = nullptr;
setLateDelay(100);
}
@ -128,8 +128,8 @@ static uint32_t lastEventCallbackDuration;
int EventQueue::executeAll(efitime_t now) {
scheduling_s * current, *tmp;
scheduling_s * executionList = NULL;
scheduling_s * lastInExecutionList = NULL;
scheduling_s * executionList = nullptr;
scheduling_s * lastInExecutionList = nullptr;
int listIterationCounter = 0;
int executionCounter = 0;
@ -233,5 +233,5 @@ scheduling_s *EventQueue::getForUnitText(int index) {
}
void EventQueue::clear(void) {
head = NULL;
head = nullptr;
}

View File

@ -41,9 +41,9 @@ PwmConfig::PwmConfig() {
mode = PM_NORMAL;
memset(&outputPins, 0, sizeof(outputPins));
phaseCount = 0;
pwmCycleCallback = NULL;
stateChangeCallback = NULL;
executor = NULL;
pwmCycleCallback = nullptr;
stateChangeCallback = nullptr;
executor = nullptr;
name = "[noname]";
arg = this;
}

View File

@ -56,7 +56,7 @@ public:
PwmConfig();
PwmConfig(float *switchTimes, SingleWave *waves);
void init(float *switchTimes, SingleWave *waves);
void *arg = NULL;
void *arg = nullptr;
void weComplexInit(const char *msg,
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
*/
pwm_gen_callback *stateChangeCallback = NULL;
pwm_gen_callback *stateChangeCallback = nullptr;
private:
/**
* float value of PWM period

View File

@ -44,5 +44,5 @@ extern WaveChart waveChart;
InjectionSignalPair::InjectionSignalPair() {
isScheduled = false;
memset(outputs, 0, sizeof(outputs));
event = NULL;
event = nullptr;
}

View File

@ -61,7 +61,7 @@ EXTERN_ENGINE
;
extern bool hasFirmwareErrorFlag;
static const char *prevOutputName = NULL;
static const char *prevOutputName = nullptr;
static InjectionEvent primeInjEvent;

View File

@ -25,7 +25,7 @@ extern bool verboseMode;
static cyclic_buffer<int> ignitionErrorDetection;
static Logging *logger;
static const char *prevSparkName = NULL;
static const char *prevSparkName = nullptr;
IgnitionEventList::IgnitionEventList() {
isReady = false;
@ -100,7 +100,7 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngle, floatms_t sparkD
secondOutput = &enginePins.coils[secondCoilIndex];
assertPinAssigned(secondOutput);
} else {
secondOutput = NULL;
secondOutput = nullptr;
}
assertPinAssigned(output);

View File

@ -212,7 +212,7 @@ void brain_pin_markUnused(brain_pin_e brainPin)
if (getBrainUsedPin(index) != NULL)
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)
totalPinsUsed--;
getBrainUsedPin(index) = NULL;
getBrainUsedPin(index) = nullptr;
}
const char *getPinFunction(brain_input_pin_e brainPin) {