From 26c14a4b4c586ba365b26827d5768b2e67f11b8c Mon Sep 17 00:00:00 2001 From: rusEfi Date: Tue, 19 Apr 2016 20:03:53 -0400 Subject: [PATCH] auto-sync --- firmware/config/engines/mazda_miata_1_6.cpp | 9 +++++---- firmware/controllers/core/fsio_core.cpp | 11 +++++++++-- firmware/controllers/core/fsio_core.h | 1 + firmware/rusefi.cpp | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/firmware/config/engines/mazda_miata_1_6.cpp b/firmware/config/engines/mazda_miata_1_6.cpp index 17edb71b01..a884b778f4 100644 --- a/firmware/config/engines/mazda_miata_1_6.cpp +++ b/firmware/config/engines/mazda_miata_1_6.cpp @@ -24,19 +24,20 @@ void setMiataNA_1_6_Configuration(DECLARE_ENGINE_PARAMETER_F) { commonFrankensoAnalogInputs(engineConfiguration); engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2; + boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED; // warning light /** * to test * set_fsio_setting 0 6200 - * set_fsio_setting 1 14 - * set_fsio_setting 2 95 + * set_fsio_setting 1 95 + * set_fsio_setting 3 14 * * eval "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting > |" */ engineConfiguration->bc.fsio_setting[0] = 2000; // RPM threshold - engineConfiguration->bc.fsio_setting[1] = 13; // voltage threshold - engineConfiguration->bc.fsio_setting[2] = 40; // CLT threshold + engineConfiguration->bc.fsio_setting[1] = 40; // CLT threshold + engineConfiguration->bc.fsio_setting[2] = 13; // voltage threshold setFsio(0, GPIOC_13, "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting > |" PASS_ENGINE_PARAMETER); diff --git a/firmware/controllers/core/fsio_core.cpp b/firmware/controllers/core/fsio_core.cpp index 1d12fcf5b5..91d00c6673 100644 --- a/firmware/controllers/core/fsio_core.cpp +++ b/firmware/controllers/core/fsio_core.cpp @@ -59,12 +59,17 @@ LENameOrdinalPair::LENameOrdinalPair(le_action_e action, const char *name) { } LEElement::LEElement() { + clear(); +} + +void LEElement::clear() { action = LE_UNDEFINED; next = NULL; fValue = NAN; iValue = 0; } + //void LEElement::init(le_action_e action, int iValue) { // this->action = action; // this->iValue = iValue; @@ -112,7 +117,7 @@ static bool float2bool(float v) { float LECalculator::pop(le_action_e action) { if (stack.size() == 0) { - warning(OBD_PCM_Processor_Fault, "empty stack for %d", action); + warning(OBD_PCM_Processor_Fault, "empty stack for action=%d", action); return NAN; } return stack.pop(); @@ -335,7 +340,9 @@ LEElement *LEElementPool::next() { firmwareError("LE_ELEMENT_POOL_SIZE overflow"); return NULL; } - return &pool[index++]; + LEElement *result = &pool[index++]; + result->clear(); + return result; } bool isNumeric(const char* line) { diff --git a/firmware/controllers/core/fsio_core.h b/firmware/controllers/core/fsio_core.h index f0306c0051..4fcb6faaf7 100644 --- a/firmware/controllers/core/fsio_core.h +++ b/firmware/controllers/core/fsio_core.h @@ -54,6 +54,7 @@ typedef enum { class LEElement { public: LEElement(); + void clear(); // void init(le_action_e action, int iValue); void init(le_action_e action); void init(le_action_e action, float fValue); diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 72d8e83d79..6b4da19d17 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -298,5 +298,5 @@ int getRusEfiVersion(void) { return 123; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE[0] * 0 != 0) return 3211; // this is here to make the compiler happy about the unused array - return 20160415; + return 20160419; }