mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
9c27b94c0f
commit
21a383083a
|
@ -109,7 +109,7 @@ extern TunerStudioOutputChannels tsOutputChannels;
|
|||
extern tunerstudio_counters_s tsState;
|
||||
|
||||
static void resetTs(void) {
|
||||
memset(&tsState, sizeof(tsState), 0);
|
||||
memset(&tsState, 0, sizeof(tsState));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -74,12 +74,19 @@ int FLStack<T, MAXSIZE>::size() {
|
|||
template <class Type, int Dimention>
|
||||
class ArrayList {
|
||||
public:
|
||||
ArrayList();
|
||||
int size;
|
||||
Type elements[Dimention];
|
||||
void reset(void);
|
||||
Type *add(void);
|
||||
};
|
||||
|
||||
template <class Type, int Dimention>
|
||||
ArrayList< Type, Dimention>::ArrayList(void) {
|
||||
memset(&elements, 0, sizeof(elements));
|
||||
reset();
|
||||
}
|
||||
|
||||
template <class Type, int Dimention>
|
||||
void ArrayList< Type, Dimention>::reset(void) {
|
||||
size = 0;
|
||||
|
|
|
@ -57,6 +57,8 @@ LENameOrdinalPair::LENameOrdinalPair(le_action_e action, const char *name) {
|
|||
LEElement::LEElement() {
|
||||
action = LE_UNDEFINED;
|
||||
next = NULL;
|
||||
fValue = NAN;
|
||||
iValue = 0;
|
||||
}
|
||||
|
||||
//void LEElement::init(le_action_e action, int iValue) {
|
||||
|
@ -260,13 +262,17 @@ float LECalculator::getValue(Engine *engine) {
|
|||
|
||||
stack.reset();
|
||||
|
||||
int counter = 0;
|
||||
while (element != NULL) {
|
||||
efiAssert(counter < 200, "FSIOcount", NAN); // just in case
|
||||
|
||||
bool_t isError = doJob(engine, element);
|
||||
if (isError) {
|
||||
// error already reported
|
||||
return NAN;
|
||||
}
|
||||
element = element->next;
|
||||
counter++;
|
||||
}
|
||||
if (stack.size() != 1) {
|
||||
warning(OBD_PCM_Processor_Fault, "unexpected FSIO stack size: %d", stack.size());
|
||||
|
@ -277,7 +283,7 @@ float LECalculator::getValue(Engine *engine) {
|
|||
|
||||
LEElementPool::LEElementPool(LEElement *pool, int size) {
|
||||
this->pool = pool;
|
||||
this->capacity = capacity;
|
||||
this->size = size;
|
||||
reset();
|
||||
}
|
||||
|
||||
|
@ -290,7 +296,7 @@ int LEElementPool::getSize() {
|
|||
}
|
||||
|
||||
LEElement *LEElementPool::next() {
|
||||
if (index == capacity - 1) {
|
||||
if (index >= size) {
|
||||
// todo: this should not be a fatal error, just an error
|
||||
firmwareError("LE_ELEMENT_POOL_SIZE overflow");
|
||||
return NULL;
|
||||
|
@ -353,6 +359,9 @@ LEElement *LEElementPool::parseExpression(const char * line) {
|
|||
}
|
||||
|
||||
LEElement *n = next();
|
||||
if (n == NULL) {
|
||||
return first;
|
||||
}
|
||||
|
||||
if (isNumeric(parsingBuffer)) {
|
||||
n->init(LE_NUMERIC_VALUE, atoff(parsingBuffer));
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
int getSize();
|
||||
private:
|
||||
int index;
|
||||
int capacity;
|
||||
int size;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -50,6 +50,9 @@ static void extCallback(EXTDriver *extp, expchannel_t channel) {
|
|||
} else if (channel == getHwPin(boardConfiguration->joystickDPin)) {
|
||||
joyD++;
|
||||
button = JB_BUTTON_D;
|
||||
} else {
|
||||
// unexpected channel
|
||||
return;
|
||||
}
|
||||
#if EFI_HD44780_LCD || defined(__DOXYGEN__)
|
||||
onJoystick(button);
|
||||
|
|
|
@ -89,7 +89,7 @@ brain_pin_e parseBrainPin(const char *str) {
|
|||
if (strEqual(str, "none"))
|
||||
return GPIO_UNASSIGNED;
|
||||
// todo: create method toLowerCase?
|
||||
if (str[0] != 'p' && str[0] != 'p') {
|
||||
if (str[0] != 'p' && str[0] != 'P') {
|
||||
return GPIO_INVALID;
|
||||
}
|
||||
char port = str[1];
|
||||
|
|
|
@ -31,6 +31,7 @@ static msg_t stThread(StepperMotor *motor) {
|
|||
motor->pulse();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void StepperMotor::pulse() {
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* @file kill_for_coverity.c
|
||||
*
|
||||
* See http://rusefi.com/forum/viewtopic.php?f=5&t=655&p=10491#p10491
|
||||
*
|
||||
* @date Feb 25, 2015
|
||||
*/
|
||||
|
||||
void special_abort(const char msg) {
|
||||
__coverity_panic__();
|
||||
}
|
Loading…
Reference in New Issue