rusEFI
The most advanced open source ECU
|
We cannot use stdlib because we do not have malloc - so, we have to implement these functions
Definition in file efilib.cpp.
Functions | |
const char * | boolToString (bool value) |
float | efiRound (float value, float precision) |
char * | efiTrim (char *param) |
bool | startsWith (const char *line, const char *prefix) |
static char * | ltoa_internal (char *p, uint32_t num, unsigned radix) |
static char * | itoa_signed (char *p, int num, unsigned radix) |
char * | itoa10 (char *p, int num) |
int | efiPow10 (int param) |
int | mytolower (const char c) |
int | djb2lowerCase (const char *str) |
void | printHistogram (Logging *logging, histogram_s *histogram) |
This function knows how to print a histogram_s summary. More... | |
float | limitRateOfChange (float newValue, float oldValue, float incrLimitPerSec, float decrLimitPerSec, float secsPassed) |
bool | isPhaseInRange (float test, float current, float next) |
static int | getBitRangeCommon (const uint8_t data[], int bitIndex, int bitWidth, int secondByteOffset) |
int | getBitRangeLsb (const uint8_t data[], int bitIndex, int bitWidth) |
int | getBitRangeMsb (const uint8_t data[], int bitIndex, int bitWidth) |
const char* boolToString | ( | bool | value | ) |
Definition at line 18 of file efilib.cpp.
Referenced by canInfo(), TriggerDecoderBase::decodeTriggerEvent(), doInitElectronicThrottle(), getValue(), printConfiguration(), printSpiState(), printStatus(), sayHello(), sdStatistics(), showAltInfo(), showHipInfo(), MapAverager::showInfo(), CanSensorBase::showInfo(), FunctionalSensor::showInfo(), StoredValueSensor::showInfo(), LinearFunc::showInfo(), ThermistorFunc::showInfo(), and triggerInfo().
int djb2lowerCase | ( | const char * | str | ) |
Definition at line 154 of file efilib.cpp.
Referenced by getConfigValueByName(), getOutputValueByName(), and setConfigValueByName().
int efiPow10 | ( | int | param | ) |
Definition at line 123 of file efilib.cpp.
Referenced by DisplayErrorCode().
float efiRound | ( | float | value, |
float | precision | ||
) |
precision | for example '0.1' for one digit fractional part |
Definition at line 33 of file efilib.cpp.
Referenced by StepperMotorBase::doIteration(), getDacValue(), obdSendValue(), setHysteresis(), StepperMotorBase::setInitialPosition(), setLinearCurve(), setRpmBin(), TriggerWaveform::setTriggerSynchronizationGap3(), and DynoView::update().
char* efiTrim | ( | char * | param | ) |
Definition at line 39 of file efilib.cpp.
Referenced by TunerStudio::handleExecuteCommand().
|
static |
Definition at line 214 of file efilib.cpp.
Referenced by getBitRangeLsb(), and getBitRangeMsb().
int getBitRangeLsb | ( | const uint8_t | data[], |
int | bitIndex, | ||
int | bitWidth | ||
) |
Definition at line 226 of file efilib.cpp.
Referenced by processHyundai().
int getBitRangeMsb | ( | const uint8_t | data[], |
int | bitIndex, | ||
int | bitWidth | ||
) |
for instance DBC 8|16@0
Definition at line 231 of file efilib.cpp.
bool isPhaseInRange | ( | float | test, |
float | current, | ||
float | next | ||
) |
Definition at line 195 of file efilib.cpp.
Referenced by onTriggerEventSparkLogic(), InjectionEvent::onTriggerTooth(), and AngleBasedEvent::shouldSchedule().
char* itoa10 | ( | char * | p, |
int | num | ||
) |
Integer to string
Definition at line 119 of file efilib.cpp.
Referenced by addEngineSnifferCrankEvent(), addEngineSnifferTdcEvent(), WaveChart::addEvent3(), getPinNameByAdcChannel(), incLogFileName(), prepareLogFileName(), and put2().
|
static |
Definition at line 102 of file efilib.cpp.
Referenced by itoa10().
float limitRateOfChange | ( | float | newValue, |
float | oldValue, | ||
float | incrLimitPerSec, | ||
float | decrLimitPerSec, | ||
float | secsPassed | ||
) |
Definition at line 189 of file efilib.cpp.
Referenced by EngineState::updateTChargeK().
|
static |
Definition at line 64 of file efilib.cpp.
Referenced by itoa_signed().
int mytolower | ( | const char | c | ) |
Definition at line 150 of file efilib.cpp.
Referenced by mystrncasecmp().
void printHistogram | ( | Logging * | logging, |
histogram_s * | histogram | ||
) |
This function knows how to print a histogram_s summary.
Definition at line 169 of file efilib.cpp.
bool startsWith | ( | const char * | line, |
const char * | prefix | ||
) |
Definition at line 51 of file efilib.cpp.