auto-sync

This commit is contained in:
rusEfi 2015-08-19 00:03:11 -04:00
parent 6e22a5819f
commit a69248ca5e
6 changed files with 25 additions and 9 deletions

View File

@ -244,6 +244,8 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
initTemperatureCurve(CLT_CURVE_SIZE, config->cltIdleCorrBins, config->cltIdleCorr);
engineConfiguration->tachPulseDuractionMs = 4;
engineConfiguration->tachPulseTriggerIndex = 4;
setTableValue(config->cltIdleCorrBins, config->cltIdleCorr, CLT_CURVE_SIZE, -40, 1.5);
setTableValue(config->cltIdleCorrBins, config->cltIdleCorr, CLT_CURVE_SIZE, -30, 1.5);

View File

@ -1,4 +1,4 @@
// this section was generated by config_definition.jar on Tue Aug 18 13:54:22 EDT 2015
// this section was generated by config_definition.jar on Tue Aug 18 23:29:59 EDT 2015
// begin
#include "rusefi_types.h"
typedef struct {
@ -1252,9 +1252,14 @@ typedef struct {
*/
float tachPulseDuractionMs;
/**
* trigger cycle index at which we start tach pulse (performance consideration)
* offset 1828
*/
int unused3[82];
int tachPulseTriggerIndex;
/**
* offset 1832
*/
int unused3[81];
/**
* offset 2156
*/
@ -1465,4 +1470,4 @@ typedef struct {
} persistent_config_s;
// end
// this section was generated by config_definition.jar on Tue Aug 18 13:54:22 EDT 2015
// this section was generated by config_definition.jar on Tue Aug 18 23:29:59 EDT 2015

View File

@ -653,8 +653,10 @@
#define crankingTpsBins_offset_hex 700
#define tachPulseDuractionMs_offset 1824
#define tachPulseDuractionMs_offset_hex 720
#define unused3_offset 1828
#define unused3_offset_hex 724
#define tachPulseTriggerIndex_offset 1828
#define tachPulseTriggerIndex_offset_hex 724
#define unused3_offset 1832
#define unused3_offset_hex 728
#define targetVBatt_offset 2156
#define alternatorOffAboveTps_offset 2160
#define alternatorOffAboveTps_offset_hex 870

View File

@ -15,11 +15,16 @@ static OutputPin tachOut;
static void tachSignalCallback(trigger_event_e ckpSignalType,
uint32_t index DECLARE_ENGINE_PARAMETER_S) {
if (index != engineConfiguration->tachPulseTriggerIndex) {
return;
}
tachOut.setValue(true);
}
void initTachometer(void) {
if (boardConfiguration->tachOutputPin == GPIO_UNASSIGNED)
if (boardConfiguration->tachOutputPin == GPIO_UNASSIGNED) {
return;
}
outputPinRegisterExt2("tach", &tachOut, boardConfiguration->tachOutputPin, &boardConfiguration->tachOutputPinMode);

View File

@ -571,7 +571,8 @@ baro_corr_table_t baroCorrTable;
float[CRANKING_CURVE_SIZE] crankingTpsBins;;"%", 1, 0, 0.0, 100.0, 2
float tachPulseDuractionMs;
int[82] unused3;
int tachPulseTriggerIndex;trigger cycle index at which we start tach pulse (performance consideration);"index", 1, 0, 0.0, 360.0, 0
int[81] unused3;
float targetVBatt;;"Volts", 1, 0, 0,30, 1
float alternatorOffAboveTps;Turn off alternator output above specified TPS;"%", 1, 0, 0, 200, 2

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 Tue Aug 18 13:54:23 EDT 2015
; this section was generated by ConfigDefinition.jar on Tue Aug 18 23:30:03 EDT 2015
pageSize = 15288
page = 1
@ -466,7 +466,8 @@ page = 1
crankingTpsCoef = array, F32, 1760, [8], "%", 1, 0, 0.0, 700.0, 2
crankingTpsBins = array, F32, 1792, [8], "%", 1, 0, 0.0, 100.0, 2
;skipping tachPulseDuractionMs offset 1824
;skipping unused3 offset 1828
tachPulseTriggerIndex = scalar, S32, 1828, "index", 1, 0, 0.0, 360.0, 0
;skipping unused3 offset 1832
targetVBatt = scalar, F32, 2156, "Volts", 1, 0, 0,30, 1
alternatorOffAboveTps = scalar, F32, 2160, "%", 1, 0, 0, 200, 2
alternatorDT = scalar, S32, 2164, "ms", 1, 0, 0, 3000, 0