688 brainpins (#694)

* GPIOF, GPIOG and GPIOH ports are not available #688
This commit is contained in:
rusefi 2019-02-22 22:10:41 -05:00 committed by GitHub
parent ef645b896f
commit 9547c44ff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 4649 additions and 4391 deletions

View File

@ -19,7 +19,8 @@
#define SWITCH_TO_BINARY_COMMAND "~"
#define PROTOCOL "001"
#define TS_SIGNATURE "rusEFI v1.04"
// this should match 'signature' in rusefi.ini
#define TS_SIGNATURE "rusEFI v1.05"
#define TS_RESPONSE_OK 0x00
#define TS_RESPONSE_BURN_OK 0x04

View File

@ -350,8 +350,6 @@ case IM_MANUAL:
}
const char *getPin_output_mode_e(pin_output_mode_e value){
switch(value) {
case Force_4_bytes_size_pin_output_mode:
return "Force_4_bytes_size_pin_output_mode";
case OM_DEFAULT:
return "OM_DEFAULT";
case OM_INVERTED:
@ -365,8 +363,6 @@ case OM_OPENDRAIN_INVERTED:
}
const char *getPin_input_mode_e(pin_input_mode_e value){
switch(value) {
case Force_4_bytes_size_pin_input_mode:
return "Force_4_bytes_size_pin_input_mode";
case PI_DEFAULT:
return "PI_DEFAULT";
case PI_PULLDOWN:
@ -506,8 +502,6 @@ case EFI_ADC_ERROR:
return "EFI_ADC_ERROR";
case EFI_ADC_NONE:
return "EFI_ADC_NONE";
case Force_4_bytes_size_cranking_adc_channel:
return "Force_4_bytes_size_cranking_adc_channel";
}
return NULL;
}
@ -545,8 +539,6 @@ case Force_4_bytes_size_ego_sensor:
}
const char *getBrain_pin_e(brain_pin_e value){
switch(value) {
case Force_4_bytes_size_brain_pin_e:
return "Force_4_bytes_size_brain_pin_e";
case GPIOA_0:
return "GPIOA_0";
case GPIOA_1:
@ -711,6 +703,102 @@ case GPIO_INVALID:
return "GPIO_INVALID";
case GPIO_UNASSIGNED:
return "GPIO_UNASSIGNED";
case GPIOF_0:
return "GPIOF_0";
case GPIOF_1:
return "GPIOF_1";
case GPIOF_10:
return "GPIOF_10";
case GPIOF_11:
return "GPIOF_11";
case GPIOF_12:
return "GPIOF_12";
case GPIOF_13:
return "GPIOF_13";
case GPIOF_14:
return "GPIOF_14";
case GPIOF_15:
return "GPIOF_15";
case GPIOF_2:
return "GPIOF_2";
case GPIOF_3:
return "GPIOF_3";
case GPIOF_4:
return "GPIOF_4";
case GPIOF_5:
return "GPIOF_5";
case GPIOF_6:
return "GPIOF_6";
case GPIOF_7:
return "GPIOF_7";
case GPIOF_8:
return "GPIOF_8";
case GPIOF_9:
return "GPIOF_9";
case GPIOG_0:
return "GPIOG_0";
case GPIOG_1:
return "GPIOG_1";
case GPIOG_10:
return "GPIOG_10";
case GPIOG_11:
return "GPIOG_11";
case GPIOG_12:
return "GPIOG_12";
case GPIOG_13:
return "GPIOG_13";
case GPIOG_14:
return "GPIOG_14";
case GPIOG_15:
return "GPIOG_15";
case GPIOG_2:
return "GPIOG_2";
case GPIOG_3:
return "GPIOG_3";
case GPIOG_4:
return "GPIOG_4";
case GPIOG_5:
return "GPIOG_5";
case GPIOG_6:
return "GPIOG_6";
case GPIOG_7:
return "GPIOG_7";
case GPIOG_8:
return "GPIOA_G";
case GPIOG_9:
return "GPIOG_9";
case GPIOH_0:
return "GPIOH_0";
case GPIOH_1:
return "GPIOH_1";
case GPIOH_10:
return "GPIOH_10";
case GPIOH_11:
return "GPIOH_11";
case GPIOH_12:
return "GPIOH_12";
case GPIOH_13:
return "GPIOH_13";
case GPIOH_14:
return "GPIOH_14";
case GPIOH_15:
return "GPIOH_15";
case GPIOH_2:
return "GPIOH_2";
case GPIOH_3:
return "GPIOH_3";
case GPIOH_4:
return "GPIOH_4";
case GPIOH_5:
return "GPIOH_5";
case GPIOH_6:
return "GPIOH_6";
case GPIOH_7:
return "GPIOH_7";
case GPIOH_8:
return "GPIOH_8";
case GPIOH_9:
return "GPIOH_9";
}
return NULL;
}

View File

@ -425,17 +425,13 @@ typedef enum {
* logical OFF is floating, logical ON is GND
*/
OM_OPENDRAIN = 2,
OM_OPENDRAIN_INVERTED = 3,
Force_4_bytes_size_pin_output_mode = ENUM_32_BITS,
OM_OPENDRAIN_INVERTED = 3
} pin_output_mode_e;
typedef enum {
PI_DEFAULT = 0,
PI_PULLUP = 1,
PI_PULLDOWN = 2,
Force_4_bytes_size_pin_input_mode = ENUM_32_BITS,
PI_PULLDOWN = 2
} pin_input_mode_e;
#define CRANK_MODE_MULTIPLIER 2.0f
@ -579,9 +575,7 @@ typedef enum {
// todo: bad choice of value since now we have ADC_CHANNEL_SENSOR and could end up with 17 and 18 also
EFI_ADC_NONE = 16,
EFI_ADC_ERROR = 999,
Force_4_bytes_size_cranking_adc_channel = ENUM_32_BITS,
EFI_ADC_ERROR = 17,
} adc_channel_e;
typedef enum {
@ -618,146 +612,145 @@ typedef enum {
* Hardware pin. This enum is platform-specific.
*/
typedef enum {
GPIOA_0 = 0,
GPIOA_1 = 1,
GPIOA_2 = 2,
GPIOA_3 = 3,
GPIOA_4 = 4,
GPIOA_5 = 5,
GPIOA_6 = 6,
GPIOA_7 = 7,
GPIOA_8 = 8,
GPIOA_9 = 9,
GPIOA_10 = 10,
GPIOA_11 = 11,
GPIOA_12 = 12,
GPIOA_13 = 13,
GPIOA_14 = 14,
GPIOA_15 = 15,
GPIO_UNASSIGNED = 0,
GPIO_INVALID = 1,
GPIOB_0 = 16,
GPIOB_1 = 17,
GPIOB_2 = 18,
GPIOB_3 = 19,
GPIOB_4 = 20,
GPIOB_5 = 21,
GPIOB_6 = 22,
GPIOB_7 = 23,
GPIOB_8 = 24,
GPIOB_9 = 25,
GPIOB_10 = 26,
GPIOB_11 = 27,
GPIOB_12 = 28,
GPIOB_13 = 29,
GPIOB_14 = 30,
GPIOB_15 = 31,
GPIOA_0 = 2,
GPIOA_1 = 3,
GPIOA_2 = 4,
GPIOA_3 = 5,
GPIOA_4 = 6,
GPIOA_5 = 7,
GPIOA_6 = 8,
GPIOA_7 = 9,
GPIOA_8 = 10,
GPIOA_9 = 11,
GPIOA_10 = 12,
GPIOA_11 = 13,
GPIOA_12 = 14,
GPIOA_13 = 15,
GPIOA_14 = 16,
GPIOA_15 = 17,
GPIOC_0 = 32,
GPIOC_1 = 33,
GPIOC_2 = 34,
GPIOC_3 = 35,
GPIOC_4 = 36,
GPIOC_5 = 37,
GPIOC_6 = 38,
GPIOC_7 = 39,
GPIOC_8 = 40,
GPIOC_9 = 41,
GPIOC_10 = 42,
GPIOC_11 = 43,
GPIOC_12 = 44,
GPIOC_13 = 45,
GPIOC_14 = 46,
GPIOC_15 = 47,
GPIOB_0 = 18,
GPIOB_1 = 19,
GPIOB_2 = 20,
GPIOB_3 = 21,
GPIOB_4 = 22,
GPIOB_5 = 23,
GPIOB_6 = 24,
GPIOB_7 = 25,
GPIOB_8 = 26,
GPIOB_9 = 27,
GPIOB_10 = 28,
GPIOB_11 = 29,
GPIOB_12 = 30,
GPIOB_13 = 31,
GPIOB_14 = 32,
GPIOB_15 = 33,
GPIOD_0 = 48,
GPIOD_1 = 49,
GPIOD_2 = 50,
GPIOD_3 = 51,
GPIOD_4 = 52,
GPIOD_5 = 53,
GPIOD_6 = 54,
GPIOD_7 = 55,
GPIOD_8 = 56,
GPIOD_9 = 57,
GPIOD_10 = 58,
GPIOD_11 = 59,
GPIOD_12 = 60,
GPIOD_13 = 61,
GPIOD_14 = 62,
GPIOD_15 = 63,
GPIOC_0 = 34,
GPIOC_1 = 35,
GPIOC_2 = 36,
GPIOC_3 = 37,
GPIOC_4 = 38,
GPIOC_5 = 39,
GPIOC_6 = 40,
GPIOC_7 = 41,
GPIOC_8 = 42,
GPIOC_9 = 43,
GPIOC_10 = 44,
GPIOC_11 = 45,
GPIOC_12 = 46,
GPIOC_13 = 47,
GPIOC_14 = 48,
GPIOC_15 = 49,
GPIOE_0 = 64,
GPIOE_1 = 65,
GPIOE_2 = 66,
GPIOE_3 = 67,
GPIOE_4 = 68,
GPIOE_5 = 69,
GPIOE_6 = 70,
GPIOE_7 = 71,
GPIOE_8 = 72,
GPIOE_9 = 73,
GPIOE_10 = 74,
GPIOE_11 = 75,
GPIOE_12 = 76,
GPIOE_13 = 77,
GPIOE_14 = 78,
GPIOE_15 = 79,
GPIOD_0 = 50,
GPIOD_1 = 51,
GPIOD_2 = 52,
GPIOD_3 = 53,
GPIOD_4 = 54,
GPIOD_5 = 55,
GPIOD_6 = 56,
GPIOD_7 = 57,
GPIOD_8 = 58,
GPIOD_9 = 59,
GPIOD_10 = 60,
GPIOD_11 = 61,
GPIOD_12 = 62,
GPIOD_13 = 63,
GPIOD_14 = 64,
GPIOD_15 = 65,
// GPIOF_0 = 80,
// GPIOF_1 = 81,
// GPIOF_2 = 82,
// GPIOF_3 = 83,
// GPIOF_4 = 84,
// GPIOF_5 = 85,
// GPIOF_6 = 86,
// GPIOF_7 = 87,
// GPIOF_8 = 88,
// GPIOF_9 = 89,
// GPIOF_10 = 90,
// GPIOF_11 = 91,
// GPIOF_12 = 92,
// GPIOF_13 = 93,
// GPIOF_14 = 94,
// GPIOF_15 = 95,
//
// GPIOG_0 = 96,
// GPIOG_1 = 97,
// GPIOG_2 = 98,
// GPIOG_3 = 99,
// GPIOG_4 = 100,
// GPIOG_5 = 101,
// GPIOG_6 = 102,
// GPIOG_7 = 103,
// GPIOG_8 = 104,
// GPIOG_9 = 105,
// GPIOG_10 = 106,
// GPIOG_11 = 107,
// GPIOG_12 = 108,
// GPIOG_13 = 109,
// GPIOG_14 = 110,
// GPIOG_15 = 111,
//
// GPIOH_0 = 112,
// GPIOH_1 = 113,
// GPIOH_2 = 114,
// GPIOH_3 = 115,
// GPIOH_4 = 116,
// GPIOH_5 = 117,
// GPIOH_6 = 118,
// GPIOH_7 = 119,
// GPIOH_8 = 120,
// GPIOH_9 = 121,
// GPIOH_10 = 122,
// GPIOH_11 = 123,
// GPIOH_12 = 124,
// GPIOH_13 = 125,
// GPIOH_14 = 126,
// GPIOH_15 = 128,
GPIOE_0 = 66,
GPIOE_1 = 67,
GPIOE_2 = 68,
GPIOE_3 = 69,
GPIOE_4 = 70,
GPIOE_5 = 71,
GPIOE_6 = 72,
GPIOE_7 = 73,
GPIOE_8 = 74,
GPIOE_9 = 75,
GPIOE_10 = 76,
GPIOE_11 = 77,
GPIOE_12 = 78,
GPIOE_13 = 79,
GPIOE_14 = 80,
GPIOE_15 = 81,
GPIO_UNASSIGNED = 80,
GPIO_INVALID = 81,
GPIOF_0 = 82,
GPIOF_1 = 83,
GPIOF_2 = 84,
GPIOF_3 = 85,
GPIOF_4 = 86,
GPIOF_5 = 87,
GPIOF_6 = 88,
GPIOF_7 = 89,
GPIOF_8 = 90,
GPIOF_9 = 91,
GPIOF_10 = 92,
GPIOF_11 = 93,
GPIOF_12 = 94,
GPIOF_13 = 95,
GPIOF_14 = 96,
GPIOF_15 = 97,
GPIOG_0 = 98,
GPIOG_1 = 99,
GPIOG_2 = 100,
GPIOG_3 = 101,
GPIOG_4 = 102,
GPIOG_5 = 103,
GPIOG_6 = 104,
GPIOG_7 = 105,
GPIOG_8 = 106,
GPIOG_9 = 107,
GPIOG_10 = 108,
GPIOG_11 = 109,
GPIOG_12 = 110,
GPIOG_13 = 111,
GPIOG_14 = 112,
GPIOG_15 = 113,
GPIOH_0 = 114,
GPIOH_1 = 115,
GPIOH_2 = 116,
GPIOH_3 = 117,
GPIOH_4 = 118,
GPIOH_5 = 119,
GPIOH_6 = 120,
GPIOH_7 = 121,
GPIOH_8 = 122,
GPIOH_9 = 123,
GPIOH_10 = 124,
GPIOH_11 = 125,
GPIOH_12 = 126,
GPIOH_13 = 127,
GPIOH_14 = 128,
GPIOH_15 = 129,
Force_4_bytes_size_brain_pin_e = ENUM_32_BITS,
} brain_pin_e;
/**

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@ typedef unsigned int time_t;
// time in seconds
typedef time_t efitimesec_t;
typedef int pin_mode_e;
typedef uint8_t pin_mode_e;
/**
* integer time in milliseconds

View File

@ -757,10 +757,10 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
// help to notice when RAM usage goes up - if a code change adds to RAM usage these variables would fail
// linking process which is the way to raise the alarm
#ifndef RAM_UNUSED_SIZE
#define RAM_UNUSED_SIZE 10200
#define RAM_UNUSED_SIZE 10000
#endif
#ifndef CCM_UNUSED_SIZE
#define CCM_UNUSED_SIZE 7000
#define CCM_UNUSED_SIZE 6800
#endif
static char UNUSED_RAM_SIZE[RAM_UNUSED_SIZE];
static char UNUSED_CCM_SIZE[CCM_UNUSED_SIZE] CCM_OPTIONAL;
@ -778,5 +778,5 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20190204;
return 20190222;
}

View File

@ -11,7 +11,7 @@
#include "engine.h"
#define FLASH_DATA_VERSION 10000
#define FLASH_DATA_VERSION 10001
typedef enum {
PC_OK = 0,

View File

@ -459,13 +459,13 @@ const char *portname(ioportid_t GPIOx) {
* this method returns the numeric part of pin name. For instance, for PC13 this would return '13'
*/
ioportmask_t getHwPin(const char *msg, brain_pin_e brainPin) {
if (brainPin == GPIO_UNASSIGNED)
if (brainPin == GPIO_UNASSIGNED || brainPin == GPIO_INVALID)
return EFI_ERROR_CODE;
if (brainPin > GPIO_UNASSIGNED || brainPin < 0) {
if (brainPin < GPIOA_0 || brainPin > GPIOH_15) {
firmwareError(CUSTOM_ERR_INVALID_PIN, "%s: Invalid brain_pin_e: %d", msg, brainPin);
return EFI_ERROR_CODE;
}
return brainPin % PORT_SIZE;
return (brainPin - GPIOA_0) % PORT_SIZE;
}
#else /* EFI_GPIO_HARDWARE */

View File

@ -35,13 +35,13 @@ static ioportid_t PORTS[] = { GPIOA, GPIOB, GPIOC, GPIOD, GPIOF};
#endif /* defined(STM32F4XX) || defined(STM32F7XX) */
ioportid_t getHwPort(const char *msg, brain_pin_e brainPin) {
if (brainPin == GPIO_UNASSIGNED)
if (brainPin == GPIO_UNASSIGNED || brainPin == GPIO_INVALID)
return GPIO_NULL;
if (brainPin > GPIO_UNASSIGNED || brainPin < 0) {
if (brainPin < GPIOA_0 || brainPin > GPIOH_15) {
firmwareError(CUSTOM_ERR_INVALID_PIN, "%s: Invalid brain_pin_e: %d", msg, brainPin);
return GPIO_NULL;
}
return PORTS[brainPin / PORT_SIZE];
return PORTS[(brainPin - GPIOA_0)/ PORT_SIZE];
}
bool efiReadPin(brain_pin_e pin) {
@ -58,6 +58,7 @@ void efiSetPadMode(const char *msg, brain_pin_e brainPin, iomode_t mode) {
if (port == GPIO_NULL) {
return;
}
efiAssertVoid(OBD_PCM_Processor_Fault, pin != EFI_ERROR_CODE, "pin_error");
scheduleMsg(&logger, "%s on %s%d", msg, portname(port), pin);

View File

@ -16,7 +16,17 @@
#include "memstreams.h"
#include "chprintf.h"
#define PIN_REPO_SIZE 7 * PORT_SIZE
static ioportid_t ports[] = {GPIOA,
GPIOB,
GPIOC,
GPIOD,
GPIOE,
GPIOF,
GPIOG,
GPIOH,
};
#define PIN_REPO_SIZE (sizeof(ports) / sizeof(ioportid_t)) * PORT_SIZE
// todo: move this into PinRepository class
const char *PIN_USED[PIN_REPO_SIZE];
static int initialized = FALSE;
@ -24,18 +34,11 @@ static int initialized = FALSE;
static LoggingWithStorage logger("pin repos");
static int totalPinsUsed = 0;
static ioportid_t ports[7] = {GPIOA,
GPIOB,
GPIOC,
GPIOD,
GPIOE,
GPIOF,
GPIOH,
};
PinRepository::PinRepository() {
}
static PinRepository instance;
static int getPortIndex(ioportid_t port) {
efiAssert(CUSTOM_ERR_ASSERT, port != NULL, "null port", -1);
if (port == GPIOA)
@ -53,8 +56,12 @@ static int getPortIndex(ioportid_t port) {
if (port == GPIOF)
return 5;
#if defined(STM32F4XX) || defined(STM32F7XX)
if (port == GPIOH)
if (port == GPIOG)
return 6;
#endif /* defined(STM32F4XX) */
#if defined(STM32F4XX) || defined(STM32F7XX)
if (port == GPIOH)
return 7;
#endif /* defined(STM32F4XX) */
firmwareError(CUSTOM_ERR_UNKNOWN_PORT, "unknown port");
return -1;
@ -125,8 +132,8 @@ void initPinRepository(void) {
msObjectInit(&portNameStream, (uint8_t*) portNameBuffer, sizeof(portNameBuffer), 0);
for (int i = 0; i < PIN_REPO_SIZE; i++)
PIN_USED[i] = 0;
memset(PIN_USED, 0, sizeof(PIN_USED));
initialized = true;
addConsoleAction("pins", reportPins);
}

View File

@ -174,23 +174,28 @@ custom mass_storage_e 4 bits, U32, @OFFSET@, [0:1], @@mass_storage_e_enum@@
! todo: maybe convert fast ADC to software scheduler as well? less sure about that
#define brain_input_pin_e_enum "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
custom brain_input_pin_e 4 bits, U32, @OFFSET@, [0:6], @@brain_input_pin_e_enum@@
custom brain_input_pin_e 1 bits, U32, @OFFSET@, [0:6], @@brain_input_pin_e_enum@@
#define brain_pin_e_enum "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
custom brain_pin_e 4 bits, U32, @OFFSET@, [0:6], @@brain_pin_e_enum@@
custom brain_pin_e 1 bits, U32, @OFFSET@, [0:6], @@brain_pin_e_enum@@
#define pin_output_mode_e_enum "default", "default inverted", "open collector", "open collector inverted"
custom pin_output_mode_e 4 bits, U32, @OFFSET@, [0:1], @@pin_output_mode_e_enum@@
custom pin_output_mode_e 1 bits, U08, @OFFSET@, [0:1], @@pin_output_mode_e_enum@@
custom pin_input_mode_e 1 scalar, U08, @OFFSET@, "todo", 1, 0, 0, 20, 1
custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:3] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "INVALID"
#define adc_channel_e_enum "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
custom adc_channel_e 4 bits, U32, @OFFSET@, [0:4] @@adc_channel_e_enum@@
custom adc_channel_e 1 bits, U08, @OFFSET@, [0:4] @@adc_channel_e_enum@@
struct air_pressure_sensor_config_s
float lowValue;kPa value at low volts;"kpa", 1, 0, -400, 800, 2
float highValue;kPa value at high volts;"kpa", 1, 0, -400, 800, 2
air_pressure_sensor_type_e type;
adc_channel_e hwChannel;
uint8_t[3] align;
end_struct
struct MAP_sensor_config_s @brief MAP averaging configuration
@ -214,6 +219,7 @@ end_struct
struct oil_pressure_config_s @brief Oil pressure sensor interpolation
adc_channel_e hwChannel;
uint8_t[3] align;
float v1;; "volts", 1, 0.0, 0, 10.0, 2
float value1;; "kPa", 1, 0.0, 0, 1000.0, 2
float v2;; "volts", 1, 0.0, 0, 10.0, 2
@ -359,12 +365,10 @@ angle_t globalTriggerAngleOffset;+Angle between Top Dead Center (TDC) and the fi
float analogInputDividerCoefficient;+Coefficient of input voltage dividers on your PCB;"coef", 1, 0, 0.01, 10.0, 2
float vbattDividerCoeff;+Battery Voltage input resistor divider coefficient;"coef", 1, 0, 0.01, 99.0, 2
adc_channel_e vbattAdcChannel;
float fanOnTemperature;+Cooling fan turn-on temperature threshold, in Celsuis;"*C", 1, 0, 0, 1000.0, 0
float fanOffTemperature;+Cooling fan turn-off temperature threshold, in Celsuis;"*C", 1, 0, 0, 1000.0, 0
adc_channel_e fuelLevelSensor;
float vehicleSpeedCoef;+This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h;"coef", 1, 0, 0.01, 2000.0, 2
@ -387,6 +391,10 @@ log_format_e logFormat;
int HD44780height;;"index", 1, 0, 0, 300, 0
adc_channel_e tpsAdcChannel;See aslo pedalPositionAdcChannel
adc_channel_e vbattAdcChannel;
adc_channel_e fuelLevelSensor;
uint8_t[1] unusedtps;
int overrideCrankingIgnition;
int sensorChartFrequency;;"index", 1, 0, 0, 300, 0 ; size 4
@ -418,65 +426,54 @@ float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0.0,
float adcVcc;; "volts", 1, 0.0, 0, 4.0, 3
float maxKnockSubDeg;maximum total number of degrees to subtract from ignition advance\nwhen knocking
adc_channel_e mafAdcChannel;See hasMafSensor
adc_channel_e mafAdcChannel;See hasMafSensor
uint8_t[3] alignMaf;
struct afr_sensor_s
adc_channel_e hwChannel;
uint8_t[3] alignAf;
float v1;; "volts", 1, 0.0, 0, 10.0, 2
float value1;; "AFR", 1, 0.0, 0, 1000.0, 2
float v2;; "volts", 1, 0.0, 0, 10.0, 2
float value2;; "AFR", 1, 0.0, 0, 1000.0, 2
end_struct
afr_sensor_s afr
adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nSee also tpsAdcChannel
uint8_t[3] unusedt;
air_pressure_sensor_config_s baroSensor;@see hasBaroSensor
struct idle_hardware_s
brain_pin_e solenoidPin;
pin_output_mode_e solenoidPinMode;
int solenoidFrequency;;"Hz", 1, 0, 0, 3000, 0
brain_pin_e solenoidPin;
brain_pin_e stepperDirectionPin;
brain_pin_e stepperStepPin;
pin_output_mode_e solenoidPinMode;
end_struct
struct_no_prefix board_configuration_s
idle_hardware_s idle;
float manIdlePosition;value between 0 and 100 used in Manual mode;"%", 1, 0, 0, 100, 0
brain_pin_e fuelPumpPin;
pin_output_mode_e fuelPumpPinMode;
brain_pin_e[INJECTION_PIN_COUNT iterate] injectionPins;
pin_output_mode_e injectionPinMode;
brain_pin_e[IGNITION_PIN_COUNT iterate] ignitionPins;
pin_output_mode_e ignitionPinMode;
brain_pin_e malfunctionIndicatorPin;
pin_output_mode_e malfunctionIndicatorPinMode;
brain_pin_e fanPin;
pin_output_mode_e fanPinMode;
float mapFrequency0Kpa;;"Hz", 1, 0, 0, 100000, 2
float mapFrequency100Kpa;;"Hz", 1, 0, 0, 100000, 2
brain_pin_e clutchDownPin;some cars have a switch to indicate that clutch pedal is all the way down
pin_input_mode_e clutchDownPinMode;
brain_pin_e alternatorControlPin;
pin_output_mode_e alternatorControlPinMode;
! todo: rename to triggerSimulatorRpm
int triggerSimulatorFrequency;rpm X;"Rpm", 1, 0, 0,30000, 0
brain_pin_e[INJECTION_PIN_COUNT iterate] injectionPins;
brain_pin_e[IGNITION_PIN_COUNT iterate] ignitionPins;
pin_output_mode_e injectionPinMode;
pin_output_mode_e ignitionPinMode;
brain_pin_e HD44780_rs;
brain_pin_e HD44780_e;
brain_pin_e HD44780_db4;
brain_pin_e HD44780_db5;
brain_pin_e HD44780_db6;
@ -484,12 +481,27 @@ brain_pin_e clutchDownPin;some cars have a switch to indicate that clutch pedal
brain_pin_e gps_rx_pin;
brain_pin_e gps_tx_pin;
brain_pin_e fuelPumpPin;
pin_output_mode_e fuelPumpPinMode;
brain_pin_e malfunctionIndicatorPin;
pin_output_mode_e malfunctionIndicatorPinMode;
pin_output_mode_e fanPinMode;
brain_pin_e fanPin;
brain_pin_e clutchDownPin;some cars have a switch to indicate that clutch pedal is all the way down
brain_pin_e alternatorControlPin;
pin_output_mode_e alternatorControlPinMode;
pin_input_mode_e clutchDownPinMode;
brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect;
pin_output_mode_e electronicThrottlePin1Mode;
brain_pin_e wboHeaterPin;
brain_pin_e cj125CsPin;
uint8_t[1] unusedEtbM;
! todo: rename to triggerSimulatorRpm
int triggerSimulatorFrequency;rpm X;"Rpm", 1, 0, 0,30000, 0
spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stock ECU stimulation code
brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect;
custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast", "INVALID"
@ -497,41 +509,42 @@ custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fas
brain_pin_e etbDirectionPin2;
brain_pin_e etbControlPin1;
brain_pin_e etbControlPin2;
pin_output_mode_e electronicThrottlePin1Mode;
brain_pin_e wboHeaterPin;
brain_pin_e cj125CsPin;
float fuelLevelEmptyTankVoltage;;"V", 1, 0, 0,10, 2
float fuelLevelFullTankVoltage;;"V", 1, 0, 0,10, 2
ego_sensor_e afr_type;AFR, WBO, EGO - whatever you like to call it;
float fuelClosedLoopAfrLowThreshold;;"ratio", 1, 0, 0, 100, 1
brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins;
pin_output_mode_e hip9011CsPinMode;
brain_pin_e tachOutputPin;+This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin.
pin_output_mode_e tachOutputPinMode;
brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins;
brain_pin_e mainRelayPin;
brain_pin_e sdCardCsPin;
brain_pin_e canTxPin;
brain_pin_e canRxPin;
brain_pin_e boardTestModeJumperPin;
uint8_t[1] unusedMa2;
int idleThreadPeriodMs;
int consoleLoopPeriodMs;
int lcdThreadPeriodMs;
brain_pin_e sdCardCsPin;
int generalPeriodicThreadPeriodMs;
uint32_t tunerStudioSerialSpeed;;"BPs", 1, 0, 0,1000000, 0
brain_pin_e boardTestModeJumperPin;
can_device_mode_e canDeviceMode;
brain_pin_e canTxPin;
brain_pin_e canRxPin;
brain_pin_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPins;
pin_output_mode_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPinModes;
brain_pin_e o2heaterPin;Narrow band o2 heater, not used for CJ125. See wboHeaterPin
pin_output_mode_e o2heaterPinModeTodO;
bit is_enabled_spi_1
bit is_enabled_spi_2
bit is_enabled_spi_3
@ -566,18 +579,22 @@ bit is_enabled_spi_2
bit unused_board_984_30
brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins;
pin_output_mode_e mainRelayPinMode;
brain_pin_e hip9011CsPin;
brain_pin_e hip9011IntHoldPin;
pin_output_mode_e hip9011IntHoldPinMode;
uint8_t[LOGIC_ANALYZER_CHANNEL_COUNT] logicAnalyzerMode;default or inverted input
int unrealisticRpmThreashold;
pin_output_mode_e mainRelayPinMode;
pin_output_mode_e[FSIO_COMMAND_COUNT iterate] gpioPinModes;
brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioOutputPins;todo: more comments
brain_pin_e[EGT_CHANNEL_COUNT iterate] max31855_cs;
spi_device_e max31855spiDevice;
brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioOutputPins;todo: more comments
pin_output_mode_e[FSIO_COMMAND_COUNT iterate] gpioPinModes;
custom uart_device_e 4 bits,U32, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UART3"
uart_device_e consoleUartDevice;
@ -588,9 +605,7 @@ custom uart_device_e 4 bits,U32, @OFFSET@, [0:1], "Off", "UART1", "UART2", "UA
float nb2ratioTo;;"value", 1, 0, 0, 1000, 5
brain_pin_e triggerErrorPin;This pin is used for debugging - snap a logic analyzer on it and see if it's ever high
pin_output_mode_e triggerErrorPinMode;
brain_pin_e acRelayPin;
pin_output_mode_e acRelayPinMode;
@ -598,27 +613,30 @@ custom pid_dt 4 scalar, U32, @OFFSET@, "ms", 1, 0, 0, 3000,
custom fsio_pwm_freq_t 2 scalar, U16, @OFFSET@, "Hz", 1, 0, 0, 3000, 0
fsio_pwm_freq_t[FSIO_COMMAND_COUNT iterate] fsioFrequency;
brain_pin_e hip9011CsPin;
brain_pin_e hip9011IntHoldPin;
pin_output_mode_e hip9011IntHoldPinMode;
custom fsio_setting_t 4 scalar, F32, @OFFSET@, "Val", 1, 0, 0, 18000, 4
fsio_setting_t[FSIO_COMMAND_COUNT iterate] fsio_setting;
brain_pin_e spi1mosiPin;
brain_pin_e spi1misoPin;
brain_pin_e spi1sckPin;
brain_pin_e spi2mosiPin;
brain_pin_e spi2misoPin;
brain_pin_e spi2sckPin;
brain_pin_e spi3mosiPin;
brain_pin_e spi3misoPin;
brain_pin_e spi3sckPin;
brain_pin_e spi3sckPin;
brain_pin_e cdmInputPin;Saab Combustion Detection Module knock signal input pin
brain_pin_e joystickCenterPin;
brain_pin_e joystickAPin;
brain_pin_e joystickBPin;
brain_pin_e joystickCPin;
brain_pin_e joystickDPin;
uint8_t[1] unusedjoy;
#define sensor_chart_e_enum "none", "trigger", "MAP", "RPM ACCEL", "DETAILED RPM", "INVALID"
custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@
@ -629,19 +647,20 @@ custom ego_sensor_e 4 bits, S32, @OFFSET@, [0:2], @@ego_sensor_e_enum@@
maf_sensor_type_e mafSensorType;
brain_input_pin_e vehicleSpeedSensorInputPin;
brain_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up
pin_input_mode_e clutchUpPinMode;
brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioDigitalInputs;todo:not finshed\nThese input pins allow us to pull toggle buttons state;
brain_input_pin_e frequencyReportingMapInputPin;
brain_input_pin_e vehicleSpeedSensorInputPin;
brain_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up
brain_input_pin_e frequencyReportingMapInputPin;
pin_input_mode_e clutchUpPinMode;
int[23] unusedspi;
end_struct
custom le_formula_t 200 string, ASCII, @OFFSET@, 200
board_configuration_s bc;
int[100] unusedspi2;
bit vvtDisplayInverted
bit fuelClosedLoopCorrectionEnabled
bit isVerboseIAC;+Print details into rusEfi console
@ -674,7 +693,9 @@ bit useFSIO5ForCriticalIssueEngineStop;Sometimes we just have to shut the engine
bit useFSIO4ForSeriousEngineWarning;Sometimes we have to miss injection on purpose to attract driver's attention
bit unused_bit_1472_29;
bit unused_bit_1472_30;
adc_channel_e hipOutputChannel;
uint8_t[3] unusedh;
custom idle_mode_e 4 bits, U32, @OFFSET@, [0:0], "Automatic", "Manual"
idle_mode_e idleMode;
@ -709,6 +730,7 @@ bit unused_1484_bit_21
int16_t primeInjFalloffTemperature;Prime injection pulse falloff temperature threshold, in Celsuis;"*C", 1, 0, 0, 1000.0, 0
adc_channel_e acSwitchAdc;A/C button input handled as analog input
uint8_t[3] unusuedsw;
int ignMathCalculateAtIndex;+At what trigger index should some ignition-related math be executed? This is a performance trick to reduce load on synchronization trigger callback.;"index", 1, 0, 0, 7000, 0
@ -719,6 +741,7 @@ bit unused_1484_bit_21
int16_t warningPeriod;set warningPeriod X;"seconds", 1, 0, 0, 60, 0
adc_channel_e vRefAdcChannel;
uint8_t[3] unusuedvref;
float knockDetectionWindowStart;
float knockDetectionWindowEnd;
@ -727,13 +750,10 @@ bit unused_1484_bit_21
float idleStepperReactionTime;;"ms", 1, 0, 1, 300, 0
float knockVThreshold;;"V", 1, 0, 1, 5, 2
custom pin_input_mode_e 4 scalar, F32, @OFFSET@, "ms", 1, 0, 0, 200, 1
pin_input_mode_e[FSIO_COMMAND_COUNT iterate] fsioInputModes;
uint8_t[12] alFIn;
adc_channel_e externalKnockSenseAdc;
int[3] unsed2342342;
int idleStepperTotalSteps;;"count", 1, 0, 5, 3000, 0
brain_pin_e stepperEnablePin;
float noAccelAfterHardLimitPeriodSecs;TODO: finish this #413;"sec", 1, 0, 0, 60, 0
@ -745,11 +765,8 @@ float[BARO_CORR_SIZE] baroCorrRpmBins;;"RPM", 1, 0, 0.0, 18000,
baro_corr_table_t baroCorrTable;
#define pin_mode_e_enum "default", "INVALID", "INVALID", "INVALID", "opendrain", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "mode12", "mode13", "mode14", "mode15", "mode16", "mode17", "mode18", "mode19", "mode20", "mode21", "mode22", "mode23", "mode24", "mode25", "mode26", "mode27", "mode28", "mode29", "mode30", "mode31", "PULLUP", "mode33", "mode34", "mode35"
custom pin_mode_e 4 bits, U32, @OFFSET@, [0:5], @@pin_mode_e_enum@@
custom pin_mode_e 1 bits, U08, @OFFSET@, [0:5], @@pin_mode_e_enum@@
pin_mode_e spi2SckMode;
pin_mode_e spi2MosiMode;
pin_mode_e spi2MisoMode;
float[CRANKING_CURVE_SIZE] crankingTpsCoef;Cranking fuel correction coefficient based on TPS;"%", 1, 0, 0.0, 700.0, 2
float[CRANKING_CURVE_SIZE] crankingTpsBins;;"%", 1, 0, 0.0, 100.0, 2
@ -768,18 +785,22 @@ custom pin_mode_e 4 bits, U32, @OFFSET@, [0:5], @@pin_mode_e_enum@@
int step1RpmWindow;RPMs prior to step1rpm point where ignition advance is retarded;"rpm", 1, 0, 0, 3000.0, 2
pid_s idleRpmPid;See cltIdleRpmBins
float wwaeBeta;Wall wetting/evaporation factor/Tau factor/fuel film;"%", 1, 0, 0.0, 1.0, 2
brain_pin_e communicationLedPin;blue LED on discovery by default
brain_pin_e runningLedPin;green LED on discovery by default
brain_pin_e binarySerialTxPin;
brain_pin_e binarySerialRxPin;
brain_pin_e[AUX_DIGITAL_VALVE_COUNT iterate] auxValves
brain_pin_e consoleSerialTxPin; todo: finish pin migration from hard-coded to configurable?
brain_pin_e consoleSerialRxPin;todo: finish pin migration from hard-coded to configurable?
float[ENGINE_NOISE_CURVE_SIZE] knockNoise;Knock sensor output knock detection threshold depending on current RPM;"v", 1, 0, 0.0, 10, 2
float[ENGINE_NOISE_CURVE_SIZE] knockNoiseRpmBins;;"RPM", 1, 0, 0.0, 18000, 2
float throttlePedalUpVoltage;;"voltage", 1, 0, -6, 6, 2
float throttlePedalWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2
pin_output_mode_e stepperDirectionPinMode;
int16_t startUpFuelPumpDuration;+on ECU start turn fuel pump on to build fuel pressure;"seconds", 1, 0, 0, 6000, 0
int16_t idlePidRpmDeadZone;If RPM is close enough let's leave IAC alone;"RPM", 1, 0, 0, 1000, 0
@ -794,8 +815,13 @@ custom pin_mode_e 4 bits, U32, @OFFSET@, [0:5], @@pin_mode_e_enum@@
int16_t afterCrankingIACtaperDuration;;"cycles", 1, 0, 0, 5000, 0
int16_t iacByTpsTaper;Extra IAC, in percent between 0 and 100, tapered between zero and idle deactivation TPS value;"percent", 1, 0, 0, 500, 0
brain_pin_e LIS302DLCsPin;
brain_pin_e fatalErrorPin;RED led on Discovery by default. TODO: start using this property
brain_pin_e warninigLedPin;TODO: start using this property
brain_pin_e configResetPin;
brain_pin_e LIS302DLCsPin;
int tpsAccelLength;;"cycles", 1, 0, 1, 200, 0
float tpsAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3
float vvtOffset;+angle between cam sensor and VVT zero position\nset vvt_offset X;"value", 1, 0, -720, 1000, 1
@ -808,15 +834,12 @@ custom pin_mode_e 4 bits, U32, @OFFSET@, [0:5], @@pin_mode_e_enum@@
float engineLoadAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3
brain_pin_e fatalErrorPin;RED led on Discovery by default. TODO: start using this property
brain_pin_e warninigLedPin;TODO: start using this property
brain_pin_e configResetPin;
uint32_t uartConsoleSerialSpeed;;"BPs", 1, 0, 0,1000000, 0
float tpsDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3
float tpsDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3
float slowAdcAlpha;+ExpAverage alpha coefficient;"coeff", 1, 0, 0, 200, 3
debug_mode_e debugMode;set debug_mode X
brain_pin_e[AUX_DIGITAL_VALVE_COUNT iterate] auxValves
float[WARMUP_TARGET_AFR_SIZE] warmupTargetAfrBins;CLT-based target AFR for PID-based control;"C", 1, 0, -100.0, 250.0, 2
float[WARMUP_TARGET_AFR_SIZE] warmupTargetAfr;;"AFR", 1, 0, 0.0, 20.0, 2
@ -827,25 +850,30 @@ custom pin_mode_e 4 bits, U32, @OFFSET@, [0:5], @@pin_mode_e_enum@@
float[MAP_ACCEL_TAPER] mapAccelTaperBins;;"counter", 1, 0, 0.0, 300, 0
float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, 2
brain_pin_e dizzySparkOutputPin;+This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin
pin_output_mode_e dizzySparkOutputPinMode;
adc_channel_e[FSIO_ANALOG_INPUT_COUNT iterate] fsioAdc;todo: rename to fsioAnalogInputs
float fixedTiming;Fixed timing, useful for TDC testing;"deg", 1, 0, -720, 720, 2
float mapLowValueVoltage;MAP voltage for low point;"v", 1, 0, 0.0, 10, 2
float mapHighValueVoltage;MAP voltage for low point;"v", 1, 0, 0.0, 10, 2
float egoValueShift;EGO value correction;"value", 1, 0, -10.0, 10, 2
brain_pin_e[AUX_PID_COUNT iterate] auxPidPins;
brain_input_pin_e camInput;+Camshaft input could be used either just for engine phase detection if your trigger shape does not include cam sensor as 'primary' channel, or it could be used for Variable Valve timing on one of the camshafts.\nTODO #660
int crankingIACposition;+IAC position during cranking;"percent", 1, 0, -100.0, 100,
pin_output_mode_e cj125CsPinMode;
brain_pin_e dizzySparkOutputPin;+This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin
pin_output_mode_e dizzySparkOutputPinMode;
int crankingIACposition;+IAC position during cranking;"percent", 1, 0, -100.0, 100,
float tChargeMinRpmMinTps;;"mult", 1, 0, 0, 3, 4
float tChargeMinRpmMaxTps;;"mult", 1, 0, 0, 3, 4
float tChargeMaxRpmMinTps;;"mult", 1, 0, 0, 3, 4
float tChargeMaxRpmMaxTps;;"mult", 1, 0, 0, 3, 4
brain_pin_e[AUX_PID_COUNT iterate] auxPidPins;
fsio_pwm_freq_t[AUX_PID_COUNT iterate] auxPidFrequency;
int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0
mass_storage_e storageMode;
spi_device_e cj125SpiDevice;
pin_output_mode_e cj125CsPinMode;
float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygenBins;Narrow Band WBO Approximation;"V", 1, 0, -10.0, 10.0, 3
float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygen;;"ratio", 1, 0, -40.0, 40.0, 2
vvt_mode_e vvtMode;set vvt_mode X
@ -867,30 +895,40 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300,
int16_t etbFreq;;"Hz", 1, 0, 0, 30000, 0
pid_s fuelClosedLoopPid;
float fuelClosedLoopAfrHighThreshold;;"ratio", 1, 0, 0, 100, 1
pin_mode_e stepperEnablePinMode;
adc_channel_e cj125ua;lambda input
adc_channel_e cj125ur;heater input
custom cfg_float_t_1f 4 scalar, F32, @OFFSET@, "Val", 1, 0, -20000000, 20000000, 1
cfg_float_t_1f[IGNITION_PIN_COUNT iterate] timing_offset_cylinder;per-cylinder timing correction
pin_input_mode_e brakePedalPinMode;
float idlePidActivationTime;;"seconds", 1, 0, 0, 60, 1
spi_device_e sdCardSpiDevice;
pin_mode_e spi3SckMode;
pin_mode_e spi3MosiMode;
pin_mode_e spi3MisoMode;
spi_device_e sdCardSpiDevice;
pin_mode_e spi1SckMode;
pin_mode_e spi1MosiMode;
pin_mode_e spi1MisoMode;
brain_pin_e brakePedalPin
pin_mode_e spi2SckMode;
pin_mode_e spi2MosiMode;
pin_mode_e spi2MisoMode;
pin_mode_e spi3SckMode;
pin_mode_e spi3MosiMode;
pin_mode_e spi3MisoMode;
pin_mode_e stepperEnablePinMode;
uint8_t[2] unuseSpi3;
brain_pin_e brakePedalPin
adc_channel_e cj125ua;lambda input
adc_channel_e cj125ur;heater input
pin_input_mode_e brakePedalPinMode;
pid_s[AUX_PID_COUNT iterate] auxPid;
oil_pressure_config_s oilPressure;
spi_device_e accelerometerSpiDevice;
spi_device_e accelerometerSpiDevice;
float[FSIO_CURVE_16] fsioCurve1Bins;;"x", 1, 0, -999, 1000.0, 3
float[FSIO_CURVE_16] fsioCurve1;;"y", 1, 0, -999, 1000.0, 3
float[FSIO_CURVE_16] fsioCurve2Bins;;"x", 1, 0, -999, 1000.0, 3
@ -899,13 +937,20 @@ spi_device_e accelerometerSpiDevice;
float[FSIO_CURVE_8] fsioCurve3;;"y", 1, 0, -999, 1000.0, 3
float[FSIO_CURVE_8] fsioCurve4Bins;;"x", 1, 0, -999, 1000.0, 3
float[FSIO_CURVE_8] fsioCurve4;;"y", 1, 0, -999, 1000.0, 3
brain_input_pin_e flexFuelSensor;
brain_pin_e test557pin
brain_input_pin_e flexFuelSensor;
brain_pin_e test557pin
pin_output_mode_e stepperDirectionPinMode;
adc_channel_e externalKnockSenseAdc;
brain_pin_e stepperEnablePin;
uint8_t[1] unusedSteDiM;
uint8_t[2] unusedTest55;
float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvanceBins;Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"RPM", 1, 0, 0.0, 18000, 2
float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"deg", 1, 0, -20, 90, 2
brain_pin_e[SERVO_COUNT iterate] servoOutputPins;todo: more comments
int16_t coastingFuelCutRpmHigh;;"rpm", 1, 0, 0, 5000, 0
int16_t coastingFuelCutRpmLow;;"rpm", 1, 0, 0, 5000, 0
int16_t coastingFuelCutTps;percent between 0 and 100;"%", 1, 0, 0, 100, 1
@ -935,8 +980,8 @@ tChargeMode_e tChargeMode;
float[ETB_BIAS_CURVE_LENGTH] etbBiasValues;PWM bias, 0 to 100%;"ETB duty cycle bias", 1, 0.0, -100, 100.0, 2
float hip9011Gain;
int[574] unusedEnd;
int[625] unusedEnd;
end_struct

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@ enable2ndByteCanID = false
[TunerStudio]
queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI v1.04" ; signature is expected to be 7 or more characters.
signature = "rusEFI v1.05" ; signature is expected to be 7 or more characters.
[Constants]
; new packet serial format with CRC

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<roms>
<!-- Generated by ConfigDefinition utility on Wed Mar 28 16:53:21 EEST 2018 -->
<!-- Generated by ConfigDefinition utility on Fri Feb 22 22:08:31 EST 2019 -->
<rom>
<romid>
@ -166,13 +166,13 @@
<table type="3D" name="Baro Correction"
category="Fuel"
storageaddress="67c" sizex="4"
storageaddress="63c" sizex="4"
sizey="4" storagetype="float" endian="big">
<scaling units="Pressure" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1"/>
<table type="X Axis" storageaddress="65c" storagetype="float" endian="big">
<table type="X Axis" storageaddress="61c" storagetype="float" endian="big">
<scaling units="kPa" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1"/>
</table>
<table type="Y Axis" storageaddress="66c" storagetype="float" endian="big">
<table type="Y Axis" storageaddress="62c" storagetype="float" endian="big">
<scaling units="RPM" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1"/>
</table>
</table>
@ -188,22 +188,22 @@
</table>
</table>
<table type="2D" name="FSIO Curve #1" storageaddress="ba8"
<table type="2D" name="FSIO Curve #1" storageaddress="af4"
category="FSIO"
sizex="16" storagetype="float" endian="big">
<scaling units="Compensation (%)" expression="x" to_byte="x" format="0.00"
fineincrement=".01" coarseincrement="0.1"/>
<table type="X Axis" storageaddress="b68" storagetype="float" endian="big">
<table type="X Axis" storageaddress="ab4" storagetype="float" endian="big">
<scaling units="uni" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1"/>
</table>
</table>
<table type="2D" name="FSIO Curve #2" storageaddress="c28"
<table type="2D" name="FSIO Curve #2" storageaddress="b74"
category="FSIO"
sizex="16" storagetype="float" endian="big">
<scaling units="Compensation (%)" expression="x" to_byte="x" format="0.00"
fineincrement=".01" coarseincrement="0.1"/>
<table type="X Axis" storageaddress="be8" storagetype="float" endian="big">
<table type="X Axis" storageaddress="b34" storagetype="float" endian="big">
<scaling units="uni" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1"/>
</table>
</table>
@ -218,11 +218,11 @@
</table>
<table type="2D" name="Engine Noise" storageaddress="78c"
<table type="2D" name="Engine Noise" storageaddress="730"
sizex="8" storagetype="float" endian="big">
<scaling units="Volts" expression="x" to_byte="x" format="0.00"
fineincrement=".01" coarseincrement="0.1"/>
<table type="X Axis" storageaddress="7ac" storagetype="float" endian="big">
<table type="X Axis" storageaddress="750" storagetype="float" endian="big">
<scaling units="RPM" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1"/>
</table>
</table>