auto-sync

This commit is contained in:
rusEfi 2015-05-08 15:06:28 -04:00
parent c9eeef95e6
commit 9dfc6aaac6
7 changed files with 77 additions and 63 deletions

View File

@ -208,14 +208,14 @@ char *getWorkingPageAddr(int pageIndex) {
int getTunerStudioPageSize(int pageIndex) {
switch (pageIndex) {
case 0:
return PAGE_0_SIZE;
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
return PAGE_1_SIZE;
return TOTAL_CONFIG_SIZE;
// case 1:
// case 2:
// case 3:
// case 4:
// case 5:
// case 6:
// return PAGE_1_SIZE;
// case 2:
// case 3:
// case 4:

View File

@ -13,15 +13,9 @@
#include "rusefi_types.h"
/**
* this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version
*/
#define TS_FILE_VERSION 20150506
#define PAGE_COUNT 1
#define PAGE_COUNT 2
#define PAGE_0_SIZE 15288
#define PAGE_1_SIZE 1152
//#define PAGE_1_SIZE 1152
#define TS_OUTPUT_SIZE 196

View File

@ -1,4 +1,4 @@
// this section was generated by config_definition.jar on Fri May 08 07:42:51 EDT 2015
// this section was generated by config_definition.jar on Fri May 08 14:42:08 EDT 2015
// begin
#include "rusefi_types.h"
typedef struct {
@ -710,11 +710,11 @@ typedef struct {
/**
* offset 336
*/
float sparkDwellBins[DWELL_COUNT];
float sparkDwellBins[DWELL_CURVE_SIZE];
/**
* offset 368
*/
float sparkDwell[DWELL_COUNT];
float sparkDwell[DWELL_CURVE_SIZE];
/**
* offset 400
*/
@ -1106,7 +1106,19 @@ typedef struct {
/**
* offset 1652
*/
int unused3[133];
float baroCorrBins[BARO_CORR_SIZE];
/**
* offset 1668
*/
float baroCorr[BARO_CORR_SIZE];
/**
* offset 1684
*/
baro_corr_table_t baroCorrTable;
/**
* offset 1748
*/
int unused3[109];
/**
* offset 2184
*/
@ -1286,4 +1298,4 @@ typedef struct {
} persistent_config_s;
// end
// this section was generated by config_definition.jar on Fri May 08 07:42:51 EDT 2015
// this section was generated by config_definition.jar on Fri May 08 14:42:08 EDT 2015

View File

@ -1,9 +1,11 @@
#define LE_COMMAND_LENGTH 200
#define TS_FILE_VERSION 20150506
#define MAP_ANGLE_SIZE 8
#define MAP_WINDOW_SIZE 8
#define CLT_CURVE_SIZE 16
#define IAT_CURVE_SIZE 16
#define VBAT_INJECTOR_CURVE_SIZE 8
#define DWELL_COUNT 8
#define DWELL_CURVE_SIZE 8
#define CRANKING_CURVE_SIZE 8
#define IGN_LOAD_COUNT 16
#define IGN_RPM_COUNT 16
@ -18,6 +20,7 @@
#define LE_COMMAND_COUNT 16
#define FUEL_RPM_COUNT 16
#define FUEL_LOAD_COUNT 16
#define BARO_CORR_SIZE 4
#define MAF_DECODING_COUNT 256
#define engineConfiguration_offset 0
#define engineConfiguration_offset_hex 0
@ -631,8 +634,13 @@
#define noAccelAfterHardLimitPeriodSecs_offset 1644
#define mapAveragingSchedulingAtIndex_offset 1648
#define mapAveragingSchedulingAtIndex_offset_hex 670
#define unused3_offset 1652
#define unused3_offset_hex 674
#define baroCorrBins_offset 1652
#define baroCorrBins_offset_hex 674
#define baroCorr_offset 1668
#define baroCorr_offset_hex 684
#define baroCorrTable_offset 1684
#define baroCorrTable_offset_hex 694
#define unused3_offset 1748
#define tpsAccelLength_offset 2184
#define tpsAccelLength_offset_hex 888
#define tpsAccelEnrichmentThreshold_offset 2188

View File

@ -9,6 +9,8 @@
#include <stdint.h>
#include "rusefi_enums.h"
#include "rusefi_generated.h"
/**
* integer time in milliseconds
@ -40,47 +42,16 @@ typedef float percent_t;
typedef void (*Void)(void);
#define INJECTION_PIN_COUNT 12
#define IGNITION_PIN_COUNT 12
#define EGT_CHANNEL_COUNT 8
#define JOYSTICK_PIN_COUNT 5
#define FUEL_RPM_COUNT 16
#define FUEL_LOAD_COUNT 16
#define LE_COMMAND_LENGTH 200
#define LE_COMMAND_COUNT 16
#define MAF_DECODING_COUNT 256
typedef char le_formula_t[LE_COMMAND_LENGTH];
#define HW_MAX_ADC_INDEX 16
typedef brain_pin_e egt_cs_array_t[EGT_CHANNEL_COUNT];
#define MAP_ANGLE_SIZE 8
#define MAP_WINDOW_SIZE 8
#define DWELL_COUNT 8
#define DWELL_CURVE_SIZE 8
#define CRANKING_CURVE_SIZE 8
#define CLT_CURVE_SIZE 16
#define IAT_CURVE_SIZE 16
#define VBAT_INJECTOR_CURVE_SIZE 8
#define IGN_LOAD_COUNT 16
#define IGN_RPM_COUNT 16
// todo: merge these two types together?
typedef float fuel_table_t[FUEL_LOAD_COUNT][FUEL_RPM_COUNT];
typedef float ignition_table_t[IGN_LOAD_COUNT][IGN_RPM_COUNT];
typedef float baro_corr_table_t[BARO_CORR_SIZE][BARO_CORR_SIZE];
// todo: rename this structure one all tables migrated
typedef struct {
float loadBins[IGN_LOAD_COUNT];

View File

@ -14,15 +14,31 @@ struct persistent_config_s
struct_no_prefix engine_configuration_s
! todo there is still a spot where this 200 is hard-coded
#define LE_COMMAND_LENGTH 200
!
! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version
!
#define TS_FILE_VERSION 20150506
#define MAP_ANGLE_SIZE 8
#define MAP_WINDOW_SIZE 8
#define CLT_CURVE_SIZE 16
#define IAT_CURVE_SIZE 16
#define VBAT_INJECTOR_CURVE_SIZE 8
#define DWELL_COUNT 8
#define DWELL_CURVE_SIZE 8
#define CRANKING_CURVE_SIZE 8
#define IGN_LOAD_COUNT 16
#define IGN_RPM_COUNT 16
#define INJECTION_PIN_COUNT 12
#define IGNITION_PIN_COUNT 12
#define EGT_CHANNEL_COUNT 8
@ -36,6 +52,8 @@ struct_no_prefix engine_configuration_s
#define FUEL_RPM_COUNT 16
#define FUEL_LOAD_COUNT 16
#define BARO_CORR_SIZE 4
#define MAF_DECODING_COUNT 256
! please note that 1024 here is 4 * FUEL_RPM_COUNT * FUEL_LOAD_COUNT
@ -43,6 +61,10 @@ custom fuel_table_t 1024 array, F32, @OFFSET@, [16x16],"ms", 1, 0,
custom ve_table_t 1024 array, F32, @OFFSET@, [16x16],"%", 1, 0, 0, 999.0, 2
custom afr_table_t 1024 array, F32, @OFFSET@, [16x16],"deg", 1, 0, 0, 25.0, 2
! todo support table size multiplocation
custom baro_corr_table_t 64 array, F32, @OFFSET@, [@@BARO_CORR_SIZE@@x@@BARO_CORR_SIZE@@],"%", 1, 0, 0, 999.0, 2
! please note that 1024 here is 4 * IGN_LOAD_COUNT * IGN_RPM_COUNT
custom ignition_table_t 1024 array, F32, @OFFSET@, [16x16],"deg", 1, 0, -360, 360, 2
@ -128,8 +150,8 @@ MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled
ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here!
ThermistorConf iat;
float[DWELL_COUNT] sparkDwellBins;;"RPM", 1, 0.0, 0.0, 18000, 2
float[DWELL_COUNT] sparkDwell;;"ms", 1, 0.0, 0.0, 30.0, 2
float[DWELL_CURVE_SIZE] sparkDwellBins;;"RPM", 1, 0.0, 0.0, 18000, 2
float[DWELL_CURVE_SIZE] sparkDwell;;"ms", 1, 0.0, 0.0, 30.0, 2
struct_no_prefix specs_s
float displacement;Engine displacement, in liters\nsee also cylindersCount;"L", 1, 0, 0, 1000.0, 2
@ -492,7 +514,11 @@ float noAccelAfterHardLimitPeriodSecs;;"sec", 1, 0, 0, 60,
int mapAveragingSchedulingAtIndex;
int[133] unused3;
float[BARO_CORR_SIZE] baroCorrBins;
float[BARO_CORR_SIZE] baroCorr;
baro_corr_table_t baroCorrTable;
int[109] unused3;
int tpsAccelLength;;"len", 1, 0, 1, 200, 3
float tpsAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3

View File

@ -40,7 +40,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated by ConfigDefinition.jar on Fri May 08 08:10:43 EDT 2015
; this section was generated by ConfigDefinition.jar on Fri May 08 14:42:08 EDT 2015
pageSize = 15288
page = 1
@ -455,7 +455,10 @@ page = 1
stepperEnablePin = bits, U32, 1640, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "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"
noAccelAfterHardLimitPeriodSecs = scalar, F32, 1644, "sec", 1, 0, 0, 60, 0
;skipping mapAveragingSchedulingAtIndex offset 1648
;skipping unused3 offset 1652
;skipping baroCorrBins offset 1652
;skipping baroCorr offset 1668
baroCorrTable = array, F32, 1684, [4x4],"%", 1, 0, 0, 999.0, 2
;skipping unused3 offset 1748
tpsAccelLength = scalar, S32, 2184, "len", 1, 0, 1, 200, 3
tpsAccelEnrichmentThreshold = scalar, F32, 2188, "roc", 1, 0, 0, 200, 3
tpsAccelEnrichmentMultiplier = scalar, F32, 2192, "coeff", 1, 0, 0, 200, 3