auto-sync

This commit is contained in:
rusEfi 2015-05-12 21:07:55 -04:00
parent df681ceb8a
commit 93f4afaa30
9 changed files with 28 additions and 37 deletions

View File

@ -23,10 +23,14 @@ void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.type = TT_DODGE_RAM; engineConfiguration->trigger.type = TT_DODGE_RAM;
engineConfiguration->injector.flow = 243.6; // 23.2lb/h engineConfiguration->injector.flow = 243.6; // 23.2lb/h
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003; engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
engineConfiguration->algorithm = LM_ALPHA_N;
// set_cranking_charge_angle 30 // set_cranking_charge_angle 30
engineConfiguration->crankingChargeAngle = 30; engineConfiguration->crankingChargeAngle = 30;
// set_whole_fuel_map 6
setWholeFuelMap(6 PASS_ENGINE_PARAMETER);
//Base engine setting //Base engine setting
engineConfiguration->specs.cylindersCount = 8; engineConfiguration->specs.cylindersCount = 8;
engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2; engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2;

View File

@ -324,6 +324,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->algorithm = LM_PLAIN_MAF; engineConfiguration->algorithm = LM_PLAIN_MAF;
engineConfiguration->vbattDividerCoeff = ((float) (15 + 65)) / 15; engineConfiguration->vbattDividerCoeff = ((float) (15 + 65)) / 15;
boardConfiguration->targetVBatt = 14;
engineConfiguration->fanOnTemperature = 75; engineConfiguration->fanOnTemperature = 75;
engineConfiguration->fanOffTemperature = 70; engineConfiguration->fanOffTemperature = 70;

View File

@ -1,4 +1,4 @@
// this section was generated by config_definition.jar on Tue May 12 14:18:57 EDT 2015 // this section was generated by config_definition.jar on Tue May 12 20:03:20 EDT 2015
// begin // begin
#include "rusefi_types.h" #include "rusefi_types.h"
typedef struct { typedef struct {
@ -372,7 +372,11 @@ typedef struct {
/** /**
* offset 232 * offset 232
*/ */
adc_channel_mode_e unusedADC[HW_MAX_ADC_INDEX]; float unusedADC[15];
/**
* offset 292
*/
float targetVBatt;
/** /**
* offset 296 * offset 296
*/ */
@ -1298,4 +1302,4 @@ typedef struct {
} persistent_config_s; } persistent_config_s;
// end // end
// this section was generated by config_definition.jar on Tue May 12 14:18:57 EDT 2015 // this section was generated by config_definition.jar on Tue May 12 20:03:20 EDT 2015

View File

@ -290,34 +290,10 @@
#define digitalPotentiometerChipSelect3_offset_hex 350 #define digitalPotentiometerChipSelect3_offset_hex 350
#define digitalPotentiometerChipSelect4_offset 852 #define digitalPotentiometerChipSelect4_offset 852
#define digitalPotentiometerChipSelect4_offset_hex 354 #define digitalPotentiometerChipSelect4_offset_hex 354
#define unusedADC1_offset 856 #define unusedADC_offset 856
#define unusedADC1_offset_hex 358 #define unusedADC_offset_hex 358
#define unusedADC2_offset 860 #define targetVBatt_offset 916
#define unusedADC3_offset 864 #define targetVBatt_offset_hex 394
#define unusedADC3_offset_hex 360
#define unusedADC4_offset 868
#define unusedADC4_offset_hex 364
#define unusedADC5_offset 872
#define unusedADC5_offset_hex 368
#define unusedADC6_offset 876
#define unusedADC7_offset 880
#define unusedADC7_offset_hex 370
#define unusedADC8_offset 884
#define unusedADC8_offset_hex 374
#define unusedADC9_offset 888
#define unusedADC9_offset_hex 378
#define unusedADC10_offset 892
#define unusedADC11_offset 896
#define unusedADC11_offset_hex 380
#define unusedADC12_offset 900
#define unusedADC12_offset_hex 384
#define unusedADC13_offset 904
#define unusedADC13_offset_hex 388
#define unusedADC14_offset 908
#define unusedADC15_offset 912
#define unusedADC15_offset_hex 390
#define unusedADC16_offset 916
#define unusedADC16_offset_hex 394
#define triggerInputPins1_offset 920 #define triggerInputPins1_offset 920
#define triggerInputPins1_offset_hex 398 #define triggerInputPins1_offset_hex 398
#define triggerInputPins2_offset 924 #define triggerInputPins2_offset 924

View File

@ -36,7 +36,7 @@ static msg_t AltCtrlThread(int param) {
while (true) { while (true) {
chThdSleepMilliseconds(100); chThdSleepMilliseconds(100);
currentAltDuty = altPid.getValue(14, getVBatt(engineConfiguration), 1); currentAltDuty = altPid.getValue(boardConfiguration->targetVBatt, getVBatt(engineConfiguration), 1);
if (boardConfiguration->isVerboseAlternator) { if (boardConfiguration->isVerboseAlternator) {
scheduleMsg(logger, "alt duty: %f/vbatt=%f/p=%f/i=%f/d=%f int=%f", currentAltDuty, getVBatt(engineConfiguration), scheduleMsg(logger, "alt duty: %f/vbatt=%f/p=%f/i=%f/d=%f int=%f", currentAltDuty, getVBatt(engineConfiguration),
altPid.getP(), altPid.getI(), altPid.getD(), altPid.getIntegration()); altPid.getP(), altPid.getI(), altPid.getD(), altPid.getIntegration());
@ -73,7 +73,8 @@ static void showAltInfo(void) {
hwPortname(boardConfiguration->alternatorControlPin)); hwPortname(boardConfiguration->alternatorControlPin));
scheduleMsg(logger, "p=%f/i=%f/d=%f", engineConfiguration->alternatorControlPFactor, scheduleMsg(logger, "p=%f/i=%f/d=%f", engineConfiguration->alternatorControlPFactor,
0, 0); // todo: i & d 0, 0); // todo: i & d
scheduleMsg(logger, "vbatt=%f/duty=%f", getVBatt(engineConfiguration), currentAltDuty); scheduleMsg(logger, "vbatt=%f/duty=%f/target=%f", getVBatt(engineConfiguration), currentAltDuty,
boardConfiguration->targetVBatt);
} }
void initAlternatorCtrl(Logging *sharedLogger) { void initAlternatorCtrl(Logging *sharedLogger) {

View File

@ -12,7 +12,7 @@
#include "engine_configuration.h" #include "engine_configuration.h"
#include "engine.h" #include "engine.h"
#define FLASH_DATA_VERSION 8050 #define FLASH_DATA_VERSION 8060
void readFromFlash(void); void readFromFlash(void);
void initFlash(Logging *sharedLogger, Engine *engine); void initFlash(Logging *sharedLogger, Engine *engine);

View File

@ -922,9 +922,13 @@ static void setInjectorLag(float value) {
} }
static void setValue(const char *paramStr, const char *valueStr) { static void setValue(const char *paramStr, const char *valueStr) {
float value = atoff(valueStr); float value = atoff(valueStr);
engineConfiguration->vehicleSpeedCoef = value;
if (strEqualCaseInsensitive(paramStr, "vsscoeff")) {
engineConfiguration->vehicleSpeedCoef = value;
} else if (strEqualCaseInsensitive(paramStr, "targetvbatt")) {
boardConfiguration->targetVBatt = value;
}
} }
void initSettings(engine_configuration_s *engineConfiguration) { void initSettings(engine_configuration_s *engineConfiguration) {

View File

@ -336,7 +336,8 @@ spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stoc
brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect; brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect;
custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast", "INVALID" custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast", "INVALID"
adc_channel_mode_e[HW_MAX_ADC_INDEX iterate] unusedADC; float[15] unusedADC;
float targetVBatt;
brain_input_pin_e[3 iterate] triggerInputPins; brain_input_pin_e[3 iterate] triggerInputPins;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB